SocketManager¶
Manages the connection and associated sockets for a Socket.IO server.
Fields:¶
Int32 ProtocolVersion¶
- Supported Socket.IO protocol version
States State¶
- The current state of this Socket.IO manager.
SocketOptions Options¶
- The SocketOptions instance that this manager will use.
Uri Uri¶
- The Uri to the Socket.IO endpoint.
HandshakeData Handshake¶
- The server sent and parsed Handshake data.
ITransport Transport¶
- The currently used main transport instance.
UInt64 RequestCounter¶
- The Request counter for request-based transports.
Socket Socket¶
- The root("/") Socket.
Socket Item¶
- Indexer to access socket associated to the given namespace.
Int32 ReconnectAttempts¶
- How many reconnect attempts made.
IParser Parser¶
- Parser to encode and decode messages and create strongly typed objects.
LoggingContext Context¶
- Logging context of this socket.io connection.
Action<SocketManager, IncomingPacket> OnIncomingPacket¶
- Called for every packet received from the server.
Methods:¶
Socket GetSocket()¶
- Returns with the "/" namespace, the same as the Socket property.
Socket GetSocket(String)¶
- Returns with the specified namespace
Void Open()¶
- This function will begin to open the Socket.IO connection by sending out the handshake request. If the Options' AutoConnect is true, it will be called automatically.
Void Close()¶
- Closes this Socket.IO connection.
EmitAll(String, Object[])¶
- Sends an event to all available namespaces.