Property | Type | Description | |
---|---|---|---|
ConnectionOpenEvent | |||
LastErrorMessage | string | ||
MessageQueueEmptyEvent | |||
MessageQueuePendingEvent |
Property | Type | Description | |
---|---|---|---|
registrationManager | RegistrationManager | ||
uri | Uri | ||
wsClient | WebSocket |
Method | Description | |
---|---|---|
Client ( string url ) : System | ||
Close ( ) : void |
Close SocketIO4Net.Client and clear all event registrations
|
|
Connect ( string endPoint ) : IEndPointClient | ||
Connect ( ) : void |
Initiate the connection with Socket.IO service
|
|
Dispose ( ) : void | ||
Emit ( string eventName, Object payload ) : void |
Asynchronously sends payload using eventName payload must a string or Json Serializable Mimicks Socket.IO client 'socket.emit('name',payload);' pattern Do not use the reserved socket.io event names: connect, disconnect, open, close, error, retry, reconnect
|
|
Emit ( string eventName, Object payload, string endPoint, Action |
Asynchronously sends payload using eventName payload must a string or Json Serializable Mimicks Socket.IO client 'socket.emit('name',payload);' pattern Do not use the reserved socket.io event names: connect, disconnect, open, close, error, retry, reconnect ArgumentOutOfRangeException will be thrown on reserved event names |
|
On ( string eventName, Action |
Asynchronously calls the action delegate on event message notification Mimicks the Socket.IO client 'socket.on('name',function(data){});' pattern Reserved socket.io event names available: connect, disconnect, open, close, error, retry, reconnect
|
|
On ( string eventName, string endPoint, Action |
||
Send ( IMessage msg ) : void |
Queue outbound message
|
|
Send ( string msg ) : void |
Method | Description | |
---|---|---|
Dispose ( bool disposing ) : void | ||
OnConnectionRetryAttemptEvent ( object sender, |
||
OnErrorEvent ( object sender, |
||
OnHeartBeatTimerCallback ( object state ) : void | ||
OnMessageEvent ( IMessage msg ) : void |
if a registerd event name is found, don't raise the more generic Message event
|
|
OnSocketConnectionClosedEvent ( object sender, |
||
ReConnect ( ) : void | ||
closeHeartBeatTimer ( ) : void | ||
closeOutboundQueue ( ) : void | ||
closeWebSocketClient ( ) : void | ||
dequeuOutboundMessages ( ) : void |
While connection is open, dequeue and send messages to the socket server
|
|
requestHandshake ( Uri uri, DownloadStringCompletedEventHandler handshakeCallback ) : void |
Client performs an initial HTTP POST to obtain a SessionId (sid) assigned to a client, followed by the heartbeat timeout, connection closing timeout, and the list of supported transports. The tansport and sid are required as part of the ws: transport connection
|
Method | Description | |
---|---|---|
EndAsyncEvent ( IAsyncResult result ) : void | ||
HandshakeCallback ( object sender, |
||
Send_backup ( string rawEncodedMessageText ) : void | ||
wsClient_Closed ( object sender, WebSocketSharp e ) : void |
websocket has closed unexpectedly - retry connection
|
|
wsClient_Error ( object sender, WebSocketSharp e ) : void | ||
wsClient_MessageReceived ( object sender, WebSocketSharp e ) : void |
Raw websocket messages from server - convert to message types and call subscribers of events and/or callbacks
|
|
wsClient_OpenEvent ( object sender, EventArgs e ) : void |
public Connect ( string endPoint ) : IEndPointClient | ||
endPoint | string | |
return | IEndPointClient |
public Emit ( string eventName, Object payload ) : void | ||
eventName | string | |
payload | Object | must be a string or a Json Serializable object |
return | void |
public Emit ( string eventName, Object payload, string endPoint, Action | ||
eventName | string | |
payload | Object | must be a string or a Json Serializable object |
endPoint | string | |
callback | Action | |
return | void |
public On ( string eventName, Action |
||
eventName | string | |
action | Action |
|
return | void |
public On ( string eventName, string endPoint, Action |
||
eventName | string | |
endPoint | string | |
action | Action |
|
return | void |
protected OnConnectionRetryAttemptEvent ( object sender, |
||
sender | object | |
e | ||
return | void |
protected OnErrorEvent ( object sender, |
||
sender | object | |
e | ||
return | void |
protected OnHeartBeatTimerCallback ( object state ) : void | ||
state | object | |
return | void |
protected OnMessageEvent ( IMessage msg ) : void | ||
msg | IMessage | |
return | void |
protected OnSocketConnectionClosedEvent ( object sender, |
||
sender | object | |
e | ||
return | void |
protected requestHandshake ( Uri uri, DownloadStringCompletedEventHandler handshakeCallback ) : void | ||
uri | Uri | http://localhost:3000 |
handshakeCallback | DownloadStringCompletedEventHandler | |
return | void |
public ManualResetEvent,System.Threading ConnectionOpenEvent | ||
return |
public ManualResetEvent,System.Threading MessageQueueEmptyEvent | ||
return |
public ManualResetEvent,System.Threading MessageQueuePendingEvent | ||
return |
protected RegistrationManager registrationManager | ||
return | RegistrationManager |