websocket.d.ts 814 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import { Transport } from "../transport";
  2. export declare class WebSocket extends Transport {
  3. protected perMessageDeflate: any;
  4. private socket;
  5. /**
  6. * WebSocket transport
  7. *
  8. * @param req
  9. * @api public
  10. */
  11. constructor(req: any);
  12. /**
  13. * Transport name
  14. *
  15. * @api public
  16. */
  17. get name(): string;
  18. /**
  19. * Advertise upgrade support.
  20. *
  21. * @api public
  22. */
  23. get handlesUpgrades(): boolean;
  24. /**
  25. * Advertise framing support.
  26. *
  27. * @api public
  28. */
  29. get supportsFraming(): boolean;
  30. /**
  31. * Writes a packet payload.
  32. *
  33. * @param {Array} packets
  34. * @api private
  35. */
  36. send(packets: any): void;
  37. /**
  38. * Closes the transport.
  39. *
  40. * @api private
  41. */
  42. doClose(fn: any): void;
  43. }