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

Defines the interface for a client that can connect, disconnect, and send data over a network. Supports both synchronous and asynchronous operations. More...

Inheritance diagram for XmobiTea.ProtonNetClient.IClient:
XmobiTea.ProtonNetClient.IHttpClient XmobiTea.ProtonNetClient.ITcpClient XmobiTea.ProtonNetClient.IUdpClient XmobiTea.ProtonNetClient.IWsClient XmobiTea.ProtonNetClient.HttpClient XmobiTea.ProtonNetClient.HttpsClient XmobiTea.ProtonNetClient.SslClient XmobiTea.ProtonNetClient.TcpClient XmobiTea.ProtonNetClient.UdpClient XmobiTea.ProtonNetClient.WsClient XmobiTea.ProtonNetClient.WssClient XmobiTea.ProtonNetClient.WsClient XmobiTea.ProtonNetClient.WssClient XmobiTea.ProtonNet.Client.Socket.Clients.SocketSslClient XmobiTea.ProtonNetClient.HttpsClient XmobiTea.ProtonNet.Client.Socket.Clients.SocketTcpClient XmobiTea.ProtonNetClient.HttpClient XmobiTea.ProtonNet.Client.Socket.Clients.SocketUdpClient XmobiTea.ProtonNet.Client.Socket.Clients.SocketWsClient XmobiTea.ProtonNet.Client.Socket.Clients.SocketWssClient

Public Member Functions

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 client that can connect, disconnect, and send data over a network. Supports both synchronous and asynchronous operations.

Member Function Documentation

◆ Connect()

◆ ConnectAsync()

bool XmobiTea.ProtonNetClient.IClient.ConnectAsync ( )

Asynchronously connects the client to the server.

Returns
True if the connection is successful; otherwise, false.

Implemented in XmobiTea.ProtonNetClient.SslClient, XmobiTea.ProtonNetClient.TcpClient, XmobiTea.ProtonNetClient.UdpClient, XmobiTea.ProtonNetClient.WsClient, and XmobiTea.ProtonNetClient.WssClient.

◆ Disconnect()

◆ DisconnectAsync()

bool XmobiTea.ProtonNetClient.IClient.DisconnectAsync ( )

Asynchronously disconnects the client from the server.

Returns
True if the disconnection is successful; otherwise, false.

Implemented in XmobiTea.ProtonNetClient.SslClient, XmobiTea.ProtonNetClient.TcpClient, and XmobiTea.ProtonNetClient.UdpClient.

◆ GetNetworkStatistics()

INetworkStatistics XmobiTea.ProtonNetClient.IClient.GetNetworkStatistics ( )

Retrieves the network statistics associated with the client.

Returns
An object implementing INetworkStatistics containing network statistics.

Implemented in XmobiTea.ProtonNetClient.SslClient, XmobiTea.ProtonNetClient.TcpClient, and XmobiTea.ProtonNetClient.UdpClient.

◆ Reconnect()

◆ ReconnectAsync()

bool XmobiTea.ProtonNetClient.IClient.ReconnectAsync ( )

Asynchronously reconnects the client to the server.

Returns
True if the reconnection is successful; otherwise, false.

Implemented in XmobiTea.ProtonNetClient.SslClient, XmobiTea.ProtonNetClient.TcpClient, and XmobiTea.ProtonNetClient.UdpClient.

◆ Send() [1/2]

int XmobiTea.ProtonNetClient.IClient.Send ( byte[] buffer)

◆ Send() [2/2]

int XmobiTea.ProtonNetClient.IClient.Send ( byte[] buffer,
int position,
int length )

Sends data to the server starting from a specific position in the buffer.

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

Implemented in XmobiTea.ProtonNetClient.SslClient, XmobiTea.ProtonNetClient.TcpClient, and XmobiTea.ProtonNetClient.UdpClient.

◆ SendAsync() [1/2]

bool XmobiTea.ProtonNetClient.IClient.SendAsync ( byte[] buffer)

Asynchronously sends data to the server.

Parameters
bufferThe data to send.
Returns
True if the data was sent successfully; otherwise, false.

Implemented in XmobiTea.ProtonNet.Client.Socket.Clients.SocketWsClient, XmobiTea.ProtonNet.Client.Socket.Clients.SocketWssClient, XmobiTea.ProtonNetClient.SslClient, XmobiTea.ProtonNetClient.TcpClient, and XmobiTea.ProtonNetClient.UdpClient.

◆ SendAsync() [2/2]

bool XmobiTea.ProtonNetClient.IClient.SendAsync ( byte[] buffer,
int position,
int length )

Asynchronously sends data to the server starting from a specific position in the buffer.

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

Implemented in XmobiTea.ProtonNetClient.SslClient, XmobiTea.ProtonNetClient.TcpClient, and XmobiTea.ProtonNetClient.UdpClient.


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