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

Defines the interface for a UDP server, extending the basic server functionalities. More...

Inheritance diagram for XmobiTea.ProtonNetServer.IUdpServer:
XmobiTea.ProtonNetServer.IServer XmobiTea.ProtonNetServer.UdpServer XmobiTea.ProtonNet.Server.Socket.Server.SocketUdpServer

Public Member Functions

bool Start (string multicastAddress, int multicastPort)
 Starts the UDP server with the specified multicast address and port.
 
int Send (EndPoint endpoint, byte[] buffer)
 Sends a datagram to the specified endpoint.
 
int Send (EndPoint endpoint, byte[] buffer, int position, int length)
 Sends a datagram to the specified endpoint with the given position and length.
 
bool SendAsync (EndPoint endpoint, byte[] buffer)
 Asynchronously sends a datagram to the specified endpoint.
 
bool SendAsync (EndPoint endpoint, byte[] buffer, int position, int length)
 Asynchronously sends a datagram to the specified endpoint with the given position and length.
 
- Public Member Functions inherited from XmobiTea.ProtonNetServer.IServer
bool Start ()
 Starts the server.
 
bool Stop ()
 Stops the server.
 
bool Restart ()
 Restarts the server.
 
bool BroadcastAll (byte[] buffer)
 Broadcasts a message to all connected clients.
 
bool BroadcastAll (byte[] buffer, int position, int length)
 Broadcasts a message to all connected clients with a specified position and length.
 
bool BroadcastAllAsync (byte[] buffer)
 Broadcasts a message asynchronously to all connected clients.
 
bool BroadcastAllAsync (byte[] buffer, int position, int length)
 Broadcasts a message asynchronously to all connected clients with a specified position and length.
 
bool DisconnectAll ()
 Disconnects all connected clients.
 
IServerNetworkStatistics GetNetworkStatistics ()
 Gets the network statistics for the server.
 

Detailed Description

Defines the interface for a UDP server, extending the basic server functionalities.

Member Function Documentation

◆ Send() [1/2]

int XmobiTea.ProtonNetServer.IUdpServer.Send ( EndPoint endpoint,
byte[] buffer )

Sends a datagram to the specified endpoint.

Parameters
endpointThe destination endpoint.
bufferThe data buffer to send.
Returns
The number of bytes sent.

Implemented in XmobiTea.ProtonNetServer.UdpServer.

◆ Send() [2/2]

int XmobiTea.ProtonNetServer.IUdpServer.Send ( EndPoint endpoint,
byte[] buffer,
int position,
int length )

Sends a datagram to the specified endpoint with the given position and length.

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

Implemented in XmobiTea.ProtonNetServer.UdpServer.

◆ SendAsync() [1/2]

bool XmobiTea.ProtonNetServer.IUdpServer.SendAsync ( EndPoint endpoint,
byte[] buffer )

Asynchronously sends a datagram to the specified endpoint.

Parameters
endpointThe destination endpoint.
bufferThe data buffer to send.
Returns
True if the data was successfully queued for sending; otherwise, false.

Implemented in XmobiTea.ProtonNetServer.UdpServer.

◆ SendAsync() [2/2]

bool XmobiTea.ProtonNetServer.IUdpServer.SendAsync ( EndPoint endpoint,
byte[] buffer,
int position,
int length )

Asynchronously sends a datagram to the specified endpoint with the given position and length.

Parameters
endpointThe destination endpoint.
bufferThe data buffer to send.
positionThe starting position in the buffer.
lengthThe length of the data to send.
Returns
True if the data was successfully queued for sending; otherwise, false.

Implemented in XmobiTea.ProtonNetServer.UdpServer.

◆ Start()

bool XmobiTea.ProtonNetServer.IUdpServer.Start ( string multicastAddress,
int multicastPort )

Starts the UDP server with the specified multicast address and port.

Parameters
multicastAddressThe multicast address to join.
multicastPortThe multicast port to use.
Returns
True if the server started successfully; otherwise, false.

Implemented in XmobiTea.ProtonNetServer.UdpServer.


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