![]() |
MTSC
1.0.5
Build TCP servers out of modules with handlers for communication, exception and logging.
|
Public Types | |
| enum | SocketState { Initial, Handshaking, Established, Closed } |
Public Member Functions | |
| WebsocketHandler | AddWebsocketHandler (IWebsocketModule module) |
| Add a webSocket module onto the server. More... | |
| void | QueueMessage (ClientData client, byte[] message) |
| Send a message to the client. More... | |
| void | QueueMessage (ClientData client, WebsocketMessage message) |
| Send a message to the client. More... | |
| void | CloseConnection (ClientData client) |
| Signals that the connetion is closing. More... | |
Public Attributes | |
| ConcurrentDictionary< ClientData, SocketState > | webSockets = new ConcurrentDictionary<ClientData, SocketState>() |
Definition at line 12 of file WebsocketHandler.cs.
| WebsocketHandler MTSC.Server.Handlers.WebsocketHandler.AddWebsocketHandler | ( | IWebsocketModule | module | ) |
Add a webSocket module onto the server.
| module | Module to be added. |
Definition at line 39 of file WebsocketHandler.cs.
| void MTSC.Server.Handlers.WebsocketHandler.CloseConnection | ( | ClientData | client | ) |
Signals that the connetion is closing.
| client | Client to be disconnected. |
Definition at line 70 of file WebsocketHandler.cs.
| void MTSC.Server.Handlers.WebsocketHandler.QueueMessage | ( | ClientData | client, |
| byte [] | message | ||
| ) |
Send a message to the client.
| message | Message to be sent to client. |
Definition at line 48 of file WebsocketHandler.cs.
| void MTSC.Server.Handlers.WebsocketHandler.QueueMessage | ( | ClientData | client, |
| WebsocketMessage | message | ||
| ) |
Send a message to the client.
Definition at line 62 of file WebsocketHandler.cs.