ProtonNet Server 1.0
An Open Solution for all your socket or web api needs.
|
Interface defining the contract for WebSocket operations and events. More...
Public Member Functions | |
void | OnWsConnecting (HttpRequest request) |
Invoked when a WebSocket connection is being established. | |
void | OnWsConnected (HttpResponse response) |
Invoked when a WebSocket connection has been successfully established. | |
bool | OnWsConnecting (HttpRequest request, HttpResponse response) |
Invoked when a WebSocket connection is being established, allowing to modify the response. | |
void | OnWsConnected (HttpRequest request) |
Invoked when a WebSocket connection has been successfully established. | |
void | OnWsDisconnecting () |
Invoked when a WebSocket connection is about to be closed. | |
void | OnWsDisconnected () |
Invoked when a WebSocket connection has been closed. | |
void | OnWsReceived (byte[] buffer, int position, int length) |
Invoked when a WebSocket message has been received. | |
void | OnWsClose (byte[] buffer, int position, int length, int status=1000) |
Invoked when a WebSocket close frame has been received. | |
void | OnWsPing (byte[] buffer, int position, int length) |
Invoked when a WebSocket ping frame has been received. | |
void | OnWsPong (byte[] buffer, int position, int length) |
Invoked when a WebSocket pong frame has been received. | |
void | OnWsError (string error) |
Invoked when a WebSocket error occurs, providing an error message. | |
void | OnWsError (SocketError error) |
Invoked when a WebSocket error occurs, providing a SocketError. | |
void | SendUpgrade (HttpResponse response) |
Sends an HTTP response to complete the WebSocket upgrade process. | |
Interface defining the contract for WebSocket operations and events.
void XmobiTea.ProtonNetCommon.IWebSocket.OnWsClose | ( | byte[] | buffer, |
int | position, | ||
int | length, | ||
int | status = 1000 ) |
Invoked when a WebSocket close frame has been received.
buffer | The buffer containing the close frame data. |
position | The position in the buffer where the data starts. |
length | The length of the close frame data. |
status | The close status code. |
Implemented in XmobiTea.ProtonNetClient.WsClient, XmobiTea.ProtonNetClient.WssClient, XmobiTea.ProtonNetCommon.WebSocket, XmobiTea.ProtonNetServer.WsServer, XmobiTea.ProtonNetServer.WsSession, XmobiTea.ProtonNetServer.WssServer, and XmobiTea.ProtonNetServer.WssSession.
void XmobiTea.ProtonNetCommon.IWebSocket.OnWsConnected | ( | HttpRequest | request | ) |
Invoked when a WebSocket connection has been successfully established.
request | The HTTP request initiating the connection. |
Implemented in XmobiTea.ProtonNet.Server.Socket.Sessions.SocketWsSession, XmobiTea.ProtonNet.Server.Socket.Sessions.SocketWssSession, XmobiTea.ProtonNetClient.WsClient, XmobiTea.ProtonNetClient.WssClient, XmobiTea.ProtonNetCommon.WebSocket, XmobiTea.ProtonNetServer.WsServer, XmobiTea.ProtonNetServer.WsSession, XmobiTea.ProtonNetServer.WssServer, and XmobiTea.ProtonNetServer.WssSession.
void XmobiTea.ProtonNetCommon.IWebSocket.OnWsConnected | ( | HttpResponse | response | ) |
Invoked when a WebSocket connection has been successfully established.
response | The HTTP response confirming the connection. |
Implemented in XmobiTea.ProtonNet.Client.Socket.Clients.SocketWsClient, XmobiTea.ProtonNet.Client.Socket.Clients.SocketWssClient, XmobiTea.ProtonNetClient.WsClient, XmobiTea.ProtonNetClient.WssClient, XmobiTea.ProtonNetCommon.WebSocket, XmobiTea.ProtonNetServer.WsServer, XmobiTea.ProtonNetServer.WsSession, XmobiTea.ProtonNetServer.WssServer, and XmobiTea.ProtonNetServer.WssSession.
void XmobiTea.ProtonNetCommon.IWebSocket.OnWsConnecting | ( | HttpRequest | request | ) |
Invoked when a WebSocket connection is being established.
request | The HTTP request initiating the connection. |
Implemented in XmobiTea.ProtonNetClient.WsClient, XmobiTea.ProtonNetClient.WssClient, XmobiTea.ProtonNetCommon.WebSocket, XmobiTea.ProtonNetServer.WsServer, XmobiTea.ProtonNetServer.WsSession, XmobiTea.ProtonNetServer.WssServer, and XmobiTea.ProtonNetServer.WssSession.
bool XmobiTea.ProtonNetCommon.IWebSocket.OnWsConnecting | ( | HttpRequest | request, |
HttpResponse | response ) |
Invoked when a WebSocket connection is being established, allowing to modify the response.
request | The HTTP request initiating the connection. |
response | The HTTP response confirming the connection. |
Implemented in XmobiTea.ProtonNetClient.WsClient, XmobiTea.ProtonNetClient.WssClient, XmobiTea.ProtonNetCommon.WebSocket, XmobiTea.ProtonNetServer.WsServer, XmobiTea.ProtonNetServer.WsSession, XmobiTea.ProtonNetServer.WssServer, and XmobiTea.ProtonNetServer.WssSession.
void XmobiTea.ProtonNetCommon.IWebSocket.OnWsDisconnected | ( | ) |
Invoked when a WebSocket connection has been closed.
Implemented in XmobiTea.ProtonNet.Server.Socket.Sessions.SocketWsSession, XmobiTea.ProtonNet.Server.Socket.Sessions.SocketWssSession, XmobiTea.ProtonNetClient.WsClient, XmobiTea.ProtonNetClient.WssClient, XmobiTea.ProtonNetCommon.WebSocket, XmobiTea.ProtonNetServer.WsServer, XmobiTea.ProtonNetServer.WsSession, XmobiTea.ProtonNetServer.WssServer, and XmobiTea.ProtonNetServer.WssSession.
void XmobiTea.ProtonNetCommon.IWebSocket.OnWsDisconnecting | ( | ) |
Invoked when a WebSocket connection is about to be closed.
Implemented in XmobiTea.ProtonNetClient.WsClient, XmobiTea.ProtonNetClient.WssClient, XmobiTea.ProtonNetCommon.WebSocket, XmobiTea.ProtonNetServer.WsServer, XmobiTea.ProtonNetServer.WsSession, XmobiTea.ProtonNetServer.WssServer, and XmobiTea.ProtonNetServer.WssSession.
void XmobiTea.ProtonNetCommon.IWebSocket.OnWsError | ( | SocketError | error | ) |
Invoked when a WebSocket error occurs, providing a SocketError.
error | The SocketError that occurred. |
Implemented in XmobiTea.ProtonNetClient.WsClient, XmobiTea.ProtonNetClient.WssClient, XmobiTea.ProtonNetCommon.WebSocket, XmobiTea.ProtonNetServer.WsServer, XmobiTea.ProtonNetServer.WsSession, XmobiTea.ProtonNetServer.WssServer, and XmobiTea.ProtonNetServer.WssSession.
void XmobiTea.ProtonNetCommon.IWebSocket.OnWsError | ( | string | error | ) |
Invoked when a WebSocket error occurs, providing an error message.
error | The error message. |
Implemented in XmobiTea.ProtonNetClient.WsClient, XmobiTea.ProtonNetClient.WssClient, XmobiTea.ProtonNetCommon.WebSocket, XmobiTea.ProtonNetServer.WsServer, XmobiTea.ProtonNetServer.WsSession, XmobiTea.ProtonNetServer.WssServer, and XmobiTea.ProtonNetServer.WssSession.
void XmobiTea.ProtonNetCommon.IWebSocket.OnWsPing | ( | byte[] | buffer, |
int | position, | ||
int | length ) |
Invoked when a WebSocket ping frame has been received.
buffer | The buffer containing the ping frame data. |
position | The position in the buffer where the data starts. |
length | The length of the ping frame data. |
Implemented in XmobiTea.ProtonNetClient.WsClient, XmobiTea.ProtonNetClient.WssClient, XmobiTea.ProtonNetCommon.WebSocket, XmobiTea.ProtonNetServer.WsServer, XmobiTea.ProtonNetServer.WsSession, XmobiTea.ProtonNetServer.WssServer, and XmobiTea.ProtonNetServer.WssSession.
void XmobiTea.ProtonNetCommon.IWebSocket.OnWsPong | ( | byte[] | buffer, |
int | position, | ||
int | length ) |
Invoked when a WebSocket pong frame has been received.
buffer | The buffer containing the pong frame data. |
position | The position in the buffer where the data starts. |
length | The length of the pong frame data. |
Implemented in XmobiTea.ProtonNetClient.WsClient, XmobiTea.ProtonNetClient.WssClient, XmobiTea.ProtonNetCommon.WebSocket, XmobiTea.ProtonNetServer.WsServer, XmobiTea.ProtonNetServer.WsSession, XmobiTea.ProtonNetServer.WssServer, and XmobiTea.ProtonNetServer.WssSession.
void XmobiTea.ProtonNetCommon.IWebSocket.OnWsReceived | ( | byte[] | buffer, |
int | position, | ||
int | length ) |
Invoked when a WebSocket message has been received.
buffer | The buffer containing the received data. |
position | The position in the buffer where the data starts. |
length | The length of the received data. |
Implemented in XmobiTea.ProtonNet.Client.Socket.Clients.SocketWsClient, XmobiTea.ProtonNet.Client.Socket.Clients.SocketWssClient, XmobiTea.ProtonNet.Server.Socket.Sessions.SocketWsSession, XmobiTea.ProtonNet.Server.Socket.Sessions.SocketWssSession, XmobiTea.ProtonNetClient.WsClient, XmobiTea.ProtonNetClient.WssClient, XmobiTea.ProtonNetCommon.WebSocket, XmobiTea.ProtonNetServer.WsServer, XmobiTea.ProtonNetServer.WsSession, XmobiTea.ProtonNetServer.WssServer, and XmobiTea.ProtonNetServer.WssSession.
void XmobiTea.ProtonNetCommon.IWebSocket.SendUpgrade | ( | HttpResponse | response | ) |
Sends an HTTP response to complete the WebSocket upgrade process.
response | The HTTP response to be sent. |
Implemented in XmobiTea.ProtonNetClient.WsClient, XmobiTea.ProtonNetClient.WssClient, XmobiTea.ProtonNetCommon.WebSocket, XmobiTea.ProtonNetServer.WsServer, XmobiTea.ProtonNetServer.WsSession, XmobiTea.ProtonNetServer.WssServer, and XmobiTea.ProtonNetServer.WssSession.