1 | import type { IncomingHttpHeaders } from "http";
|
2 | import type { ParsedUrlQuery } from "querystring";
|
3 | export type DisconnectReason = "transport error" | "transport close" | "forced close" | "ping timeout" | "parse error" | "server shutting down" | "forced server close" | "client namespace disconnect" | "server namespace disconnect";
|
4 | export interface SocketReservedEventsMap {
|
5 | disconnect: (reason: DisconnectReason, description?: any) => void;
|
6 | disconnecting: (reason: DisconnectReason, description?: any) => void;
|
7 | error: (err: Error) => void;
|
8 | }
|
9 | export interface EventEmitterReservedEventsMap {
|
10 | newListener: (eventName: string | Symbol, listener: (...args: any[]) => void) => void;
|
11 | removeListener: (eventName: string | Symbol, listener: (...args: any[]) => void) => void;
|
12 | }
|
13 | export declare const RESERVED_EVENTS: ReadonlySet<string | Symbol>;
|
14 |
|
15 |
|
16 |
|
17 | export interface Handshake {
|
18 | |
19 |
|
20 |
|
21 | headers: IncomingHttpHeaders;
|
22 | |
23 |
|
24 |
|
25 | time: string;
|
26 | |
27 |
|
28 |
|
29 | address: string;
|
30 | |
31 |
|
32 |
|
33 | xdomain: boolean;
|
34 | |
35 |
|
36 |
|
37 | secure: boolean;
|
38 | |
39 |
|
40 |
|
41 | issued: number;
|
42 | |
43 |
|
44 |
|
45 | url: string;
|
46 | |
47 |
|
48 |
|
49 | query: ParsedUrlQuery;
|
50 | |
51 |
|
52 |
|
53 | auth: {
|
54 | [key: string]: any;
|
55 | };
|
56 | }
|