ProtonNet Server 1.0
An Open Solution for all your socket or web api needs.
Loading...
Searching...
No Matches
XmobiTea.ProtonNetServer.IWsSession Interface Reference

Represents the interface for a WebSocket session, providing methods for sending various WebSocket frames. More...

Inheritance diagram for XmobiTea.ProtonNetServer.IWsSession:
XmobiTea.ProtonNetServer.ISession XmobiTea.ProtonNetServer.WsSession XmobiTea.ProtonNetServer.WssSession XmobiTea.ProtonNet.Server.Socket.Sessions.SocketWsSession XmobiTea.ProtonNet.Server.Socket.Sessions.SocketWssSession

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.
 

Detailed Description

Represents the interface for a WebSocket session, providing methods for sending various WebSocket frames.

Member Function Documentation

◆ SendBinary() [1/2]

int XmobiTea.ProtonNetServer.IWsSession.SendBinary ( byte[] buffer)

Sends a binary message synchronously to the WebSocket connection.

Parameters
bufferThe buffer containing the binary message.
Returns
The number of bytes sent.

Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.

◆ SendBinary() [2/2]

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.

Parameters
bufferThe buffer containing the binary message.
positionThe starting position in the buffer.
lengthThe length of the data to send.
Returns
The number of bytes sent.

Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.

◆ SendBinaryAsync() [1/2]

bool XmobiTea.ProtonNetServer.IWsSession.SendBinaryAsync ( byte[] buffer)

Sends a binary message asynchronously to the WebSocket connection.

Parameters
bufferThe buffer containing the binary message.
Returns
True if the message was sent successfully; otherwise, false.

Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.

◆ SendBinaryAsync() [2/2]

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.

Parameters
bufferThe buffer containing the binary message.
positionThe starting position in the buffer.
lengthThe length of the data to send.
Returns
True if the message was sent successfully; otherwise, false.

Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.

◆ SendClose() [1/2]

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.

Parameters
statusThe close status code.
bufferThe buffer containing additional data to send with the close frame.
Returns
The number of bytes sent.

Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.

◆ SendClose() [2/2]

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.

Parameters
statusThe close status code.
bufferThe buffer containing additional data to send with the close frame.
positionThe starting position in the buffer.
lengthThe length of the data to send.
Returns
The number of bytes sent.

Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.

◆ SendCloseAsync() [1/2]

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.

Parameters
statusThe close status code.
bufferThe buffer containing additional data to send with the close frame.
Returns
True if the close frame was sent successfully; otherwise, false.

Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.

◆ SendCloseAsync() [2/2]

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.

Parameters
statusThe close status code.
bufferThe buffer containing additional data to send with the close frame.
positionThe starting position in the buffer.
lengthThe length of the data to send.
Returns
True if the close frame was sent successfully; otherwise, false.

Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.

◆ SendPing() [1/2]

int XmobiTea.ProtonNetServer.IWsSession.SendPing ( byte[] buffer)

Sends a ping frame synchronously to the WebSocket connection.

Parameters
bufferThe buffer containing the ping frame.
Returns
The number of bytes sent.

Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.

◆ SendPing() [2/2]

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.

Parameters
bufferThe buffer containing the ping frame.
positionThe starting position in the buffer.
lengthThe length of the data to send.
Returns
The number of bytes sent.

Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.

◆ SendPingAsync() [1/2]

bool XmobiTea.ProtonNetServer.IWsSession.SendPingAsync ( byte[] buffer)

Sends a ping frame asynchronously to the WebSocket connection.

Parameters
bufferThe buffer containing the ping frame.
Returns
True if the ping frame was sent successfully; otherwise, false.

Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.

◆ SendPingAsync() [2/2]

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.

Parameters
bufferThe buffer containing the ping frame.
positionThe starting position in the buffer.
lengthThe length of the data to send.
Returns
True if the ping frame was sent successfully; otherwise, false.

Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.

◆ SendPong() [1/2]

int XmobiTea.ProtonNetServer.IWsSession.SendPong ( byte[] buffer)

Sends a pong frame synchronously to the WebSocket connection.

Parameters
bufferThe buffer containing the pong frame.
Returns
The number of bytes sent.

Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.

◆ SendPong() [2/2]

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.

Parameters
bufferThe buffer containing the pong frame.
positionThe starting position in the buffer.
lengthThe length of the data to send.
Returns
The number of bytes sent.

Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.

◆ SendPongAsync() [1/2]

bool XmobiTea.ProtonNetServer.IWsSession.SendPongAsync ( byte[] buffer)

Sends a pong frame asynchronously to the WebSocket connection.

Parameters
bufferThe buffer containing the pong frame.
Returns
True if the pong frame was sent successfully; otherwise, false.

Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.

◆ SendPongAsync() [2/2]

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.

Parameters
bufferThe buffer containing the pong frame.
positionThe starting position in the buffer.
lengthThe length of the data to send.
Returns
True if the pong frame was sent successfully; otherwise, false.

Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.

◆ SendText() [1/2]

int XmobiTea.ProtonNetServer.IWsSession.SendText ( byte[] buffer)

Sends a text message synchronously to the WebSocket connection.

Parameters
bufferThe buffer containing the text message.
Returns
The number of bytes sent.

Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.

◆ SendText() [2/2]

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.

Parameters
bufferThe buffer containing the text message.
positionThe starting position in the buffer.
lengthThe length of the data to send.
Returns
The number of bytes sent.

Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.

◆ SendTextAsync() [1/2]

bool XmobiTea.ProtonNetServer.IWsSession.SendTextAsync ( byte[] buffer)

Sends a text message asynchronously to the WebSocket connection.

Parameters
bufferThe buffer containing the text message.
Returns
True if the message was sent successfully; otherwise, false.

Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.

◆ SendTextAsync() [2/2]

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.

Parameters
bufferThe buffer containing the text message.
positionThe starting position in the buffer.
lengthThe length of the data to send.
Returns
True if the message was sent successfully; otherwise, false.

Implemented in XmobiTea.ProtonNetServer.WsSession, and XmobiTea.ProtonNetServer.WssSession.


The documentation for this interface was generated from the following file: