mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 04:01:52 +00:00
Client#conn, Socket#conn is an instance of engine.Socket, including properties "request" and "upgraded".
https://github.com/socketio/socket.io/blob/master/docs/API.md#socketconn https://github.com/socketio/socket.io/blob/master/docs/API.md#clientconn https://github.com/socketio/engine.io#properties-2
This commit is contained in:
Vendored
+42
-44
@@ -509,28 +509,7 @@ declare namespace SocketIO {
|
||||
/**
|
||||
* The underlying Engine.io Socket instance
|
||||
*/
|
||||
conn: {
|
||||
|
||||
/**
|
||||
* The ID for this socket - matches Client.id
|
||||
*/
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* The Engine.io Server for this socket
|
||||
*/
|
||||
server: any;
|
||||
|
||||
/**
|
||||
* The ready state for the client. Either 'opening', 'open', 'closing', or 'closed'
|
||||
*/
|
||||
readyState: string;
|
||||
|
||||
/**
|
||||
* The remote IP for this connection
|
||||
*/
|
||||
remoteAddress: string;
|
||||
};
|
||||
conn: EngineSocket;
|
||||
|
||||
/**
|
||||
* The list of rooms that this Socket is currently in, where
|
||||
@@ -751,28 +730,7 @@ declare namespace SocketIO {
|
||||
/**
|
||||
* The underlying Engine.io Socket instance
|
||||
*/
|
||||
conn: {
|
||||
|
||||
/**
|
||||
* The ID for this socket - matches Client.id
|
||||
*/
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* The Engine.io Server for this socket
|
||||
*/
|
||||
server: any;
|
||||
|
||||
/**
|
||||
* The ready state for the client. Either 'opening', 'open', 'closing', or 'closed'
|
||||
*/
|
||||
readyState: string;
|
||||
|
||||
/**
|
||||
* The remote IP for this connection
|
||||
*/
|
||||
remoteAddress: string;
|
||||
};
|
||||
conn: EngineSocket;
|
||||
|
||||
/**
|
||||
* The ID for this client. Regenerated at every connection
|
||||
@@ -797,4 +755,44 @@ declare namespace SocketIO {
|
||||
*/
|
||||
nsps: {[nsp: string]: Socket};
|
||||
}
|
||||
|
||||
/**
|
||||
* A reference to the underlying engine.io Socket connection.
|
||||
*/
|
||||
interface EngineSocket extends NodeJS.EventEmitter {
|
||||
/**
|
||||
* The ID for this socket - matches Client.id
|
||||
*/
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* The Engine.io Server for this socket
|
||||
*/
|
||||
server: any;
|
||||
|
||||
/**
|
||||
* The ready state for the client. Either 'opening', 'open', 'closing', or 'closed'
|
||||
*/
|
||||
readyState: string;
|
||||
|
||||
/**
|
||||
* The remote IP for this connection
|
||||
*/
|
||||
remoteAddress: string;
|
||||
|
||||
/**
|
||||
* whether the transport has been upgraded
|
||||
*/
|
||||
upgraded: boolean;
|
||||
|
||||
/**
|
||||
* (http.IncomingMessage): request that originated the Socket
|
||||
*/
|
||||
request: any;
|
||||
|
||||
/**
|
||||
* (Transport): transport reference
|
||||
*/
|
||||
transport: any;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user