| 39 | } |
| 40 | |
| 41 | export interface SocketOptions { |
| 42 | /** |
| 43 | * The host that we're connecting to. Set from the URI passed when connecting |
| 44 | */ |
| 45 | host?: string; |
| 46 | |
| 47 | /** |
| 48 | * The hostname for our connection. Set from the URI passed when connecting |
| 49 | */ |
| 50 | hostname?: string; |
| 51 | |
| 52 | /** |
| 53 | * If this is a secure connection. Set from the URI passed when connecting |
| 54 | */ |
| 55 | secure?: boolean; |
| 56 | |
| 57 | /** |
| 58 | * The port for our connection. Set from the URI passed when connecting |
| 59 | */ |
| 60 | port?: string | number; |
| 61 | |
| 62 | /** |
| 63 | * Any query parameters in our uri. Set from the URI passed when connecting |
| 64 | */ |
| 65 | query?: { [key: string]: any }; |
| 66 | |
| 67 | /** |
| 68 | * `http.Agent` to use, defaults to `false` (NodeJS only) |
| 69 | * |
| 70 | * Note: the type should be "undefined | http.Agent | https.Agent | false", but this would break browser-only clients. |
| 71 | * |
| 72 | * @see https://nodejs.org/api/http.html#httprequestoptions-callback |
| 73 | */ |
| 74 | agent?: string | boolean; |
| 75 | |
| 76 | /** |
| 77 | * Whether the client should try to upgrade the transport from |
| 78 | * long-polling to something better. |
| 79 | * @default true |
| 80 | */ |
| 81 | upgrade?: boolean; |
| 82 | |
| 83 | /** |
| 84 | * Forces base 64 encoding for polling transport even when XHR2 |
| 85 | * responseType is available and WebSocket even if the used standard |
| 86 | * supports binary. |
| 87 | */ |
| 88 | forceBase64?: boolean; |
| 89 | |
| 90 | /** |
| 91 | * The param name to use as our timestamp key |
| 92 | * @default 't' |
| 93 | */ |
| 94 | timestampParam?: string; |
| 95 | |
| 96 | /** |
| 97 | * Whether to add the timestamp with each transport request. Note: this |
| 98 | * is ignored if the browser is IE or Android, in which case requests |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…