ProtonNet Server 1.0
An Open Solution for all your socket or web api needs.
|
Represents the interface for a WebSocket session, providing methods for sending various WebSocket frames. More...
Public Member Functions | |
int | SendText (byte[] buffer) |
Sends a text message synchronously to the WebSocket connection. | |
int | SendText (byte[] buffer, int position, int length) |
Sends a text message synchronously to the WebSocket connection with a specified position and length. | |
bool | SendTextAsync (byte[] buffer) |
Sends a text message asynchronously to the WebSocket connection. | |
bool | SendTextAsync (byte[] buffer, int position, int length) |
Sends a text message asynchronously to the WebSocket connection with a specified position and length. | |
int | SendBinary (byte[] buffer) |
Sends a binary message synchronously to the WebSocket connection. | |
int | SendBinary (byte[] buffer, int position, int length) |
Sends a binary message synchronously to the WebSocket connection with a specified position and length. | |
bool | SendBinaryAsync (byte[] buffer) |
Sends a binary message asynchronously to the WebSocket connection. | |
bool | SendBinaryAsync (byte[] buffer, int position, int length) |
Sends a binary message asynchronously to the WebSocket connection with a specified position and length. | |
int | SendClose (int status, byte[] buffer) |
Sends a close frame synchronously to the WebSocket connection with the specified status code and buffer. | |
int | SendClose (int status, byte[] buffer, int position, int length) |
Sends a close frame synchronously to the WebSocket connection with the specified status code, buffer, position, and length. | |
bool | SendCloseAsync (int status, byte[] buffer) |
Sends a close frame asynchronously to the WebSocket connection with the specified status code and buffer. | |
bool | SendCloseAsync (int status, byte[] buffer, int position, int length) |
Sends a close frame asynchronously to the WebSocket connection with the specified status code, buffer, position, and length. | |
int | SendPing (byte[] buffer) |
Sends a ping frame synchronously to the WebSocket connection. | |
int | SendPing (byte[] buffer, int position, int length) |
Sends a ping frame synchronously to the WebSocket connection with a specified position and length. | |
bool | SendPingAsync (byte[] buffer) |
Sends a ping frame asynchronously to the WebSocket connection. | |
bool | SendPingAsync (byte[] buffer, int position, int length) |
Sends a ping frame asynchronously to the WebSocket connection with a specified position and length. | |
int | SendPong (byte[] buffer) |
Sends a pong frame synchronously to the WebSocket connection. | |
int | SendPong (byte[] buffer, int position, int length) |
Sends a pong frame synchronously to the WebSocket connection with a specified position and length. | |
bool | SendPongAsync (byte[] buffer) |
Sends a pong frame asynchronously to the WebSocket connection. | |
bool | SendPongAsync (byte[] buffer, int position, int length) |
Sends a pong frame asynchronously to the WebSocket connection with a specified position and length. | |
Public Member Functions inherited from XmobiTea.ProtonNetServer.ISession | |
bool | Disconnect () |
Disconnects the session. | |
int | Send (byte[] buffer) |
Sends data synchronously to the connected client. | |
int | Send (byte[] buffer, int position, int length) |
Sends data synchronously to the connected client with a specified position and length. | |
bool | SendAsync (byte[] buffer) |
Sends data asynchronously to the connected client. | |
bool | SendAsync (byte[] buffer, int position, int length) |
Sends data asynchronously to the connected client with a specified position and length. | |
INetworkStatistics | GetNetworkStatistics () |
Gets the network statistics for the session. | |
Represents the interface for a WebSocket session, providing methods for sending various WebSocket frames.
int XmobiTea.ProtonNetServer.IWsSession.SendBinary | ( | byte[] | buffer | ) |
Sends a binary message synchronously to the WebSocket connection.
buffer | The buffer containing the binary message. |
Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.
int XmobiTea.ProtonNetServer.IWsSession.SendBinary | ( | byte[] | buffer, |
int | position, | ||
int | length ) |
Sends a binary message synchronously to the WebSocket connection with a specified position and length.
buffer | The buffer containing the binary message. |
position | The starting position in the buffer. |
length | The length of the data to send. |
Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.
bool XmobiTea.ProtonNetServer.IWsSession.SendBinaryAsync | ( | byte[] | buffer | ) |
Sends a binary message asynchronously to the WebSocket connection.
buffer | The buffer containing the binary message. |
Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.
bool XmobiTea.ProtonNetServer.IWsSession.SendBinaryAsync | ( | byte[] | buffer, |
int | position, | ||
int | length ) |
Sends a binary message asynchronously to the WebSocket connection with a specified position and length.
buffer | The buffer containing the binary message. |
position | The starting position in the buffer. |
length | The length of the data to send. |
Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.
int XmobiTea.ProtonNetServer.IWsSession.SendClose | ( | int | status, |
byte[] | buffer ) |
Sends a close frame synchronously to the WebSocket connection with the specified status code and buffer.
status | The close status code. |
buffer | The buffer containing additional data to send with the close frame. |
Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.
int XmobiTea.ProtonNetServer.IWsSession.SendClose | ( | int | status, |
byte[] | buffer, | ||
int | position, | ||
int | length ) |
Sends a close frame synchronously to the WebSocket connection with the specified status code, buffer, position, and length.
status | The close status code. |
buffer | The buffer containing additional data to send with the close frame. |
position | The starting position in the buffer. |
length | The length of the data to send. |
Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.
bool XmobiTea.ProtonNetServer.IWsSession.SendCloseAsync | ( | int | status, |
byte[] | buffer ) |
Sends a close frame asynchronously to the WebSocket connection with the specified status code and buffer.
status | The close status code. |
buffer | The buffer containing additional data to send with the close frame. |
Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.
bool XmobiTea.ProtonNetServer.IWsSession.SendCloseAsync | ( | int | status, |
byte[] | buffer, | ||
int | position, | ||
int | length ) |
Sends a close frame asynchronously to the WebSocket connection with the specified status code, buffer, position, and length.
status | The close status code. |
buffer | The buffer containing additional data to send with the close frame. |
position | The starting position in the buffer. |
length | The length of the data to send. |
Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.
int XmobiTea.ProtonNetServer.IWsSession.SendPing | ( | byte[] | buffer | ) |
Sends a ping frame synchronously to the WebSocket connection.
buffer | The buffer containing the ping frame. |
Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.
int XmobiTea.ProtonNetServer.IWsSession.SendPing | ( | byte[] | buffer, |
int | position, | ||
int | length ) |
Sends a ping frame synchronously to the WebSocket connection with a specified position and length.
buffer | The buffer containing the ping frame. |
position | The starting position in the buffer. |
length | The length of the data to send. |
Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.
bool XmobiTea.ProtonNetServer.IWsSession.SendPingAsync | ( | byte[] | buffer | ) |
Sends a ping frame asynchronously to the WebSocket connection.
buffer | The buffer containing the ping frame. |
Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.
bool XmobiTea.ProtonNetServer.IWsSession.SendPingAsync | ( | byte[] | buffer, |
int | position, | ||
int | length ) |
Sends a ping frame asynchronously to the WebSocket connection with a specified position and length.
buffer | The buffer containing the ping frame. |
position | The starting position in the buffer. |
length | The length of the data to send. |
Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.
int XmobiTea.ProtonNetServer.IWsSession.SendPong | ( | byte[] | buffer | ) |
Sends a pong frame synchronously to the WebSocket connection.
buffer | The buffer containing the pong frame. |
Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.
int XmobiTea.ProtonNetServer.IWsSession.SendPong | ( | byte[] | buffer, |
int | position, | ||
int | length ) |
Sends a pong frame synchronously to the WebSocket connection with a specified position and length.
buffer | The buffer containing the pong frame. |
position | The starting position in the buffer. |
length | The length of the data to send. |
Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.
bool XmobiTea.ProtonNetServer.IWsSession.SendPongAsync | ( | byte[] | buffer | ) |
Sends a pong frame asynchronously to the WebSocket connection.
buffer | The buffer containing the pong frame. |
Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.
bool XmobiTea.ProtonNetServer.IWsSession.SendPongAsync | ( | byte[] | buffer, |
int | position, | ||
int | length ) |
Sends a pong frame asynchronously to the WebSocket connection with a specified position and length.
buffer | The buffer containing the pong frame. |
position | The starting position in the buffer. |
length | The length of the data to send. |
Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.
int XmobiTea.ProtonNetServer.IWsSession.SendText | ( | byte[] | buffer | ) |
Sends a text message synchronously to the WebSocket connection.
buffer | The buffer containing the text message. |
Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.
int XmobiTea.ProtonNetServer.IWsSession.SendText | ( | byte[] | buffer, |
int | position, | ||
int | length ) |
Sends a text message synchronously to the WebSocket connection with a specified position and length.
buffer | The buffer containing the text message. |
position | The starting position in the buffer. |
length | The length of the data to send. |
Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.
bool XmobiTea.ProtonNetServer.IWsSession.SendTextAsync | ( | byte[] | buffer | ) |
Sends a text message asynchronously to the WebSocket connection.
buffer | The buffer containing the text message. |
Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.
bool XmobiTea.ProtonNetServer.IWsSession.SendTextAsync | ( | byte[] | buffer, |
int | position, | ||
int | length ) |
Sends a text message asynchronously to the WebSocket connection with a specified position and length.
buffer | The buffer containing the text message. |
position | The starting position in the buffer. |
length | The length of the data to send. |
Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.