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

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

Inheritance diagram for XmobiTea.ProtonNetClient.IUdpClient:
XmobiTea.ProtonNetClient.IClient XmobiTea.ProtonNetClient.UdpClient XmobiTea.ProtonNet.Client.Socket.Clients.SocketUdpClient

Public Member Functions

int Send (EndPoint endPoint, byte[] buffer)
 Sends data to the specified endpoint synchronously.
 
int Send (EndPoint endPoint, byte[] buffer, int position, int length)
 Sends data to the specified endpoint synchronously, starting from a specific position in the buffer.
 
bool SendAsync (EndPoint endPoint, byte[] buffer)
 Sends data to the specified endpoint asynchronously.
 
bool SendAsync (EndPoint endPoint, byte[] buffer, int position, int length)
 Sends data to the specified endpoint asynchronously, starting from a specific position in the buffer.
 
void JoinMulticastGroup (string address)
 Joins a multicast group by the specified address.
 
void LeaveMulticastGroup (string address)
 Leaves a multicast group by the specified address.
 
- 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 UDP client that can connect, disconnect, send, and receive data over a network. Supports both synchronous and asynchronous operations.

Member Function Documentation

◆ JoinMulticastGroup()

void XmobiTea.ProtonNetClient.IUdpClient.JoinMulticastGroup ( string address)

Joins a multicast group by the specified address.

Parameters
addressThe address of the multicast group.

Implemented in XmobiTea.ProtonNetClient.UdpClient.

◆ LeaveMulticastGroup()

void XmobiTea.ProtonNetClient.IUdpClient.LeaveMulticastGroup ( string address)

Leaves a multicast group by the specified address.

Parameters
addressThe address of the multicast group.

Implemented in XmobiTea.ProtonNetClient.UdpClient.

◆ Send() [1/2]

int XmobiTea.ProtonNetClient.IUdpClient.Send ( EndPoint endPoint,
byte[] buffer )

Sends data to the specified endpoint synchronously.

Parameters
endPointThe endpoint to which the data is sent.
bufferThe data to send.
Returns
The number of bytes sent.

Implemented in XmobiTea.ProtonNetClient.UdpClient.

◆ Send() [2/2]

int XmobiTea.ProtonNetClient.IUdpClient.Send ( EndPoint endPoint,
byte[] buffer,
int position,
int length )

Sends data to the specified endpoint synchronously, starting from a specific position in the buffer.

Parameters
endPointThe endpoint to which the data is sent.
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.UdpClient.

◆ SendAsync() [1/2]

bool XmobiTea.ProtonNetClient.IUdpClient.SendAsync ( EndPoint endPoint,
byte[] buffer )

Sends data to the specified endpoint asynchronously.

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

Implemented in XmobiTea.ProtonNetClient.UdpClient.

◆ SendAsync() [2/2]

bool XmobiTea.ProtonNetClient.IUdpClient.SendAsync ( EndPoint endPoint,
byte[] buffer,
int position,
int length )

Sends data to the specified endpoint asynchronously, starting from a specific position in the buffer.

Parameters
endPointThe endpoint to which the data is sent.
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.UdpClient.


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