33 lines
805 B
TypeScript
Raw Normal View History

2025-01-25 10:46:42 +01:00
import { EngineRequest, Transport } from "../transport";
import type { Packet } from "engine.io-parser";
2023-10-10 22:00:26 +02:00
export declare class WebSocket extends Transport {
protected perMessageDeflate: any;
private socket;
/**
* WebSocket transport
*
2025-01-25 10:46:42 +01:00
* @param {EngineRequest} req
2023-10-10 22:00:26 +02:00
*/
2025-01-25 10:46:42 +01:00
constructor(req: EngineRequest);
2023-10-10 22:00:26 +02:00
/**
* Transport name
*/
get name(): string;
/**
* Advertise upgrade support.
*/
get handlesUpgrades(): boolean;
2025-01-25 10:46:42 +01:00
send(packets: Packet[]): void;
2023-10-10 22:00:26 +02:00
/**
2025-01-25 10:46:42 +01:00
* Whether the encoding of the WebSocket frame can be skipped.
* @param packet
* @private
2023-10-10 22:00:26 +02:00
*/
2025-01-25 10:46:42 +01:00
private _canSendPreEncodedFrame;
private _doSend;
private _doSendLast;
private _onSent;
private _onSentLast;
doClose(fn?: () => void): void;
2023-10-10 22:00:26 +02:00
}