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

Defines the interface for a WebSocket client that can send and receive various types of data frames over a network. More...

Inheritance diagram for XmobiTea.ProtonNetClient.IWsClient:
XmobiTea.ProtonNetClient.IClient XmobiTea.ProtonNetClient.WsClient XmobiTea.ProtonNetClient.WssClient XmobiTea.ProtonNet.Client.Socket.Clients.SocketWsClient XmobiTea.ProtonNet.Client.Socket.Clients.SocketWssClient

Public Member Functions

int SendText (byte[] buffer)
 Sends a text message synchronously to the server.
 
int SendText (byte[] buffer, int position, int length)
 Sends a text message synchronously to the server.
 
bool SendTextAsync (byte[] buffer)
 Sends a text message asynchronously to the server.
 
bool SendTextAsync (byte[] buffer, int position, int length)
 Sends a text message asynchronously to the server.
 
int SendBinary (byte[] buffer)
 Sends a binary message synchronously to the server.
 
int SendBinary (byte[] buffer, int position, int length)
 Sends a binary message synchronously to the server.
 
bool SendBinaryAsync (byte[] buffer)
 Sends a binary message asynchronously to the server.
 
bool SendBinaryAsync (byte[] buffer, int position, int length)
 Sends a binary message asynchronously to the server.
 
int SendClose (int status, byte[] buffer)
 Sends a close frame with a status code synchronously to the server.
 
int SendClose (int status, byte[] buffer, int position, int length)
 Sends a close frame with a status code synchronously to the server.
 
bool SendCloseAsync (int status, byte[] buffer)
 Sends a close frame with a status code asynchronously to the server.
 
bool SendCloseAsync (int status, byte[] buffer, int position, int length)
 Sends a close frame with a status code asynchronously to the server.
 
int SendPing (byte[] buffer)
 Sends a ping frame synchronously to the server.
 
int SendPing (byte[] buffer, int position, int length)
 Sends a ping frame synchronously to the server.
 
bool SendPingAsync (byte[] buffer)
 Sends a ping frame asynchronously to the server.
 
bool SendPingAsync (byte[] buffer, int position, int length)
 Sends a ping frame asynchronously to the server.
 
int SendPong (byte[] buffer)
 Sends a pong frame synchronously to the server.
 
int SendPong (byte[] buffer, int position, int length)
 Sends a pong frame synchronously to the server.
 
bool SendPongAsync (byte[] buffer)
 Sends a pong frame asynchronously to the server.
 
bool SendPongAsync (byte[] buffer, int position, int length)
 Sends a pong frame asynchronously to the server.
 
- Public Member Functions inherited from XmobiTea.ProtonNetClient.IClient
bool Connect ()
 Connects the client to the server.
 
bool Reconnect ()
 Reconnects the client to the server.
 
bool Disconnect ()
 Disconnects the client from the server.
 
bool ConnectAsync ()
 Asynchronously connects the client to the server.
 
bool ReconnectAsync ()
 Asynchronously reconnects the client to the server.
 
bool DisconnectAsync ()
 Asynchronously disconnects the client from the server.
 
INetworkStatistics GetNetworkStatistics ()
 Retrieves the network statistics associated with the client.
 
int Send (byte[] buffer)
 Sends data to the server.
 
int Send (byte[] buffer, int position, int length)
 Sends data to the server starting from a specific position in the buffer.
 
bool SendAsync (byte[] buffer)
 Asynchronously sends data to the server.
 
bool SendAsync (byte[] buffer, int position, int length)
 Asynchronously sends data to the server starting from a specific position in the buffer.
 

Detailed Description

Defines the interface for a WebSocket client that can send and receive various types of data frames over a network.

Member Function Documentation

◆ SendBinary() [1/2]

int XmobiTea.ProtonNetClient.IWsClient.SendBinary ( byte[] buffer)

Sends a binary message synchronously to the server.

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

Implemented in XmobiTea.ProtonNetClient.WsClient, and XmobiTea.ProtonNetClient.WssClient.

◆ SendBinary() [2/2]

int XmobiTea.ProtonNetClient.IWsClient.SendBinary ( byte[] buffer,
int position,
int length )

Sends a binary message synchronously to the server.

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

Implemented in XmobiTea.ProtonNetClient.WsClient, and XmobiTea.ProtonNetClient.WssClient.

◆ SendBinaryAsync() [1/2]

bool XmobiTea.ProtonNetClient.IWsClient.SendBinaryAsync ( byte[] buffer)

Sends a binary message asynchronously to the server.

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

Implemented in XmobiTea.ProtonNetClient.WsClient, and XmobiTea.ProtonNetClient.WssClient.

◆ SendBinaryAsync() [2/2]

bool XmobiTea.ProtonNetClient.IWsClient.SendBinaryAsync ( byte[] buffer,
int position,
int length )

Sends a binary message asynchronously to the server.

Parameters
bufferThe byte array containing the binary message.
positionThe starting position in the buffer.
lengthThe number of bytes to send.
Returns
True if the message was sent successfully, otherwise false.

Implemented in XmobiTea.ProtonNetClient.WsClient, and XmobiTea.ProtonNetClient.WssClient.

◆ SendClose() [1/2]

int XmobiTea.ProtonNetClient.IWsClient.SendClose ( int status,
byte[] buffer )

Sends a close frame with a status code synchronously to the server.

Parameters
statusThe close status code.
bufferThe byte array containing the close message.
Returns
The number of bytes sent.

Implemented in XmobiTea.ProtonNetClient.WsClient, and XmobiTea.ProtonNetClient.WssClient.

◆ SendClose() [2/2]

int XmobiTea.ProtonNetClient.IWsClient.SendClose ( int status,
byte[] buffer,
int position,
int length )

Sends a close frame with a status code synchronously to the server.

Parameters
statusThe close status code.
bufferThe byte array containing the close message.
positionThe starting position in the buffer.
lengthThe number of bytes to send.
Returns
The number of bytes sent.

Implemented in XmobiTea.ProtonNetClient.WsClient, and XmobiTea.ProtonNetClient.WssClient.

◆ SendCloseAsync() [1/2]

bool XmobiTea.ProtonNetClient.IWsClient.SendCloseAsync ( int status,
byte[] buffer )

Sends a close frame with a status code asynchronously to the server.

Parameters
statusThe close status code.
bufferThe byte array containing the close message.
Returns
True if the message was sent successfully, otherwise false.

Implemented in XmobiTea.ProtonNetClient.WsClient, and XmobiTea.ProtonNetClient.WssClient.

◆ SendCloseAsync() [2/2]

bool XmobiTea.ProtonNetClient.IWsClient.SendCloseAsync ( int status,
byte[] buffer,
int position,
int length )

Sends a close frame with a status code asynchronously to the server.

Parameters
statusThe close status code.
bufferThe byte array containing the close message.
positionThe starting position in the buffer.
lengthThe number of bytes to send.
Returns
True if the message was sent successfully, otherwise false.

Implemented in XmobiTea.ProtonNetClient.WsClient, and XmobiTea.ProtonNetClient.WssClient.

◆ SendPing() [1/2]

int XmobiTea.ProtonNetClient.IWsClient.SendPing ( byte[] buffer)

Sends a ping frame synchronously to the server.

Parameters
bufferThe byte array containing the ping message.
Returns
The number of bytes sent.

Implemented in XmobiTea.ProtonNetClient.WsClient, and XmobiTea.ProtonNetClient.WssClient.

◆ SendPing() [2/2]

int XmobiTea.ProtonNetClient.IWsClient.SendPing ( byte[] buffer,
int position,
int length )

Sends a ping frame synchronously to the server.

Parameters
bufferThe byte array containing the ping message.
positionThe starting position in the buffer.
lengthThe number of bytes to send.
Returns
The number of bytes sent.

Implemented in XmobiTea.ProtonNetClient.WsClient, and XmobiTea.ProtonNetClient.WssClient.

◆ SendPingAsync() [1/2]

bool XmobiTea.ProtonNetClient.IWsClient.SendPingAsync ( byte[] buffer)

Sends a ping frame asynchronously to the server.

Parameters
bufferThe byte array containing the ping message.
Returns
True if the message was sent successfully, otherwise false.

Implemented in XmobiTea.ProtonNetClient.WsClient, and XmobiTea.ProtonNetClient.WssClient.

◆ SendPingAsync() [2/2]

bool XmobiTea.ProtonNetClient.IWsClient.SendPingAsync ( byte[] buffer,
int position,
int length )

Sends a ping frame asynchronously to the server.

Parameters
bufferThe byte array containing the ping message.
positionThe starting position in the buffer.
lengthThe number of bytes to send.
Returns
True if the message was sent successfully, otherwise false.

Implemented in XmobiTea.ProtonNetClient.WsClient, and XmobiTea.ProtonNetClient.WssClient.

◆ SendPong() [1/2]

int XmobiTea.ProtonNetClient.IWsClient.SendPong ( byte[] buffer)

Sends a pong frame synchronously to the server.

Parameters
bufferThe byte array containing the pong message.
Returns
The number of bytes sent.

Implemented in XmobiTea.ProtonNetClient.WsClient, and XmobiTea.ProtonNetClient.WssClient.

◆ SendPong() [2/2]

int XmobiTea.ProtonNetClient.IWsClient.SendPong ( byte[] buffer,
int position,
int length )

Sends a pong frame synchronously to the server.

Parameters
bufferThe byte array containing the pong message.
positionThe starting position in the buffer.
lengthThe number of bytes to send.
Returns
The number of bytes sent.

Implemented in XmobiTea.ProtonNetClient.WsClient, and XmobiTea.ProtonNetClient.WssClient.

◆ SendPongAsync() [1/2]

bool XmobiTea.ProtonNetClient.IWsClient.SendPongAsync ( byte[] buffer)

Sends a pong frame asynchronously to the server.

Parameters
bufferThe byte array containing the pong message.
Returns
True if the message was sent successfully, otherwise false.

Implemented in XmobiTea.ProtonNetClient.WsClient, and XmobiTea.ProtonNetClient.WssClient.

◆ SendPongAsync() [2/2]

bool XmobiTea.ProtonNetClient.IWsClient.SendPongAsync ( byte[] buffer,
int position,
int length )

Sends a pong frame asynchronously to the server.

Parameters
bufferThe byte array containing the pong message.
positionThe starting position in the buffer.
lengthThe number of bytes to send.
Returns
True if the message was sent successfully, otherwise false.

Implemented in XmobiTea.ProtonNetClient.WsClient, and XmobiTea.ProtonNetClient.WssClient.

◆ SendText() [1/2]

int XmobiTea.ProtonNetClient.IWsClient.SendText ( byte[] buffer)

Sends a text message synchronously to the server.

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

Implemented in XmobiTea.ProtonNetClient.WsClient, and XmobiTea.ProtonNetClient.WssClient.

◆ SendText() [2/2]

int XmobiTea.ProtonNetClient.IWsClient.SendText ( byte[] buffer,
int position,
int length )

Sends a text message synchronously to the server.

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

Implemented in XmobiTea.ProtonNetClient.WsClient, and XmobiTea.ProtonNetClient.WssClient.

◆ SendTextAsync() [1/2]

bool XmobiTea.ProtonNetClient.IWsClient.SendTextAsync ( byte[] buffer)

Sends a text message asynchronously to the server.

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

Implemented in XmobiTea.ProtonNetClient.WsClient, and XmobiTea.ProtonNetClient.WssClient.

◆ SendTextAsync() [2/2]

bool XmobiTea.ProtonNetClient.IWsClient.SendTextAsync ( byte[] buffer,
int position,
int length )

Sends a text message asynchronously to the server.

Parameters
bufferThe byte array containing the text message.
positionThe starting position in the buffer.
lengthThe number of bytes to send.
Returns
True if the message was sent successfully, otherwise false.

Implemented in XmobiTea.ProtonNetClient.WsClient, and XmobiTea.ProtonNetClient.WssClient.


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