polling.d.ts
2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import { Transport } from "../transport";
export declare class Polling extends Transport {
maxHttpBufferSize: number;
httpCompression: any;
private res;
private dataReq;
private dataRes;
private shouldClose;
private readonly closeTimeout;
/**
* HTTP polling constructor.
*
* @api public.
*/
constructor(req: any);
/**
* Transport name
*
* @api public
*/
get name(): string;
get supportsFraming(): boolean;
/**
* Overrides onRequest.
*
* @param req
*
* @api private
*/
onRequest(req: any): void;
/**
* The client sends a request awaiting for us to send data.
*
* @api private
*/
onPollRequest(req: any, res: any): void;
/**
* The client sends a request with data.
*
* @api private
*/
onDataRequest(req: any, res: any): void;
/**
* Cleanup request.
*
* @api private
*/
private onDataRequestCleanup;
/**
* Processes the incoming data payload.
*
* @param {String} encoded payload
* @api private
*/
onData(data: any): void;
/**
* Overrides onClose.
*
* @api private
*/
onClose(): void;
/**
* Writes a packet payload.
*
* @param {Object} packet
* @api private
*/
send(packets: any): void;
/**
* Writes data as response to poll request.
*
* @param {String} data
* @param {Object} options
* @api private
*/
write(data: any, options: any): void;
/**
* Performs the write.
*
* @api private
*/
doWrite(data: any, options: any, callback: any): void;
/**
* Compresses data.
*
* @api private
*/
compress(data: any, encoding: any, callback: any): void;
/**
* Closes the transport.
*
* @api private
*/
doClose(fn: any): void;
/**
* Returns headers for a response.
*
* @param req - request
* @param {Object} extra headers
* @api private
*/
headers(req: any, headers: any): any;
}