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

Represents the interface for a server, providing methods for starting, stopping, and managing connections and data broadcasts. More...

Inheritance diagram for XmobiTea.ProtonNetServer.IServer:
XmobiTea.ProtonNetServer.IHttpServer XmobiTea.ProtonNetServer.ITcpServer XmobiTea.ProtonNetServer.IUdpServer XmobiTea.ProtonNetServer.IWsServer XmobiTea.ProtonNetServer.HttpServer XmobiTea.ProtonNetServer.HttpsServer XmobiTea.ProtonNetServer.SslServer XmobiTea.ProtonNetServer.TcpServer XmobiTea.ProtonNetServer.UdpServer XmobiTea.ProtonNetServer.WsServer XmobiTea.ProtonNetServer.WssServer XmobiTea.ProtonNet.Server.WebApi.Server.WebApiHttpServer XmobiTea.ProtonNetServer.WsServer XmobiTea.ProtonNet.Server.WebApi.Server.WebApiHttpsServer XmobiTea.ProtonNetServer.WssServer XmobiTea.ProtonNet.Server.Socket.Server.SocketSslServer XmobiTea.ProtonNetServer.HttpsServer XmobiTea.ProtonNet.Server.Socket.Server.SocketTcpServer XmobiTea.ProtonNetServer.HttpServer XmobiTea.ProtonNet.Server.Socket.Server.SocketUdpServer XmobiTea.ProtonNet.Server.Socket.Server.SocketWsServer XmobiTea.ProtonNet.Server.Socket.Server.SocketWssServer

Public Member Functions

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

Represents the interface for a server, providing methods for starting, stopping, and managing connections and data broadcasts.

Member Function Documentation

◆ BroadcastAll() [1/2]

bool XmobiTea.ProtonNetServer.IServer.BroadcastAll ( byte[] buffer)

Broadcasts a message to all connected clients.

Parameters
bufferThe message buffer to broadcast.
Returns
True if the message was broadcasted successfully; otherwise, false.

Implemented in XmobiTea.ProtonNetServer.SslServer, XmobiTea.ProtonNetServer.TcpServer, XmobiTea.ProtonNetServer.UdpServer, XmobiTea.ProtonNetServer.WsServer, and XmobiTea.ProtonNetServer.WssServer.

◆ BroadcastAll() [2/2]

bool XmobiTea.ProtonNetServer.IServer.BroadcastAll ( byte[] buffer,
int position,
int length )

Broadcasts a message to all connected clients with a specified position and length.

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

Implemented in XmobiTea.ProtonNetServer.SslServer, XmobiTea.ProtonNetServer.TcpServer, XmobiTea.ProtonNetServer.UdpServer, XmobiTea.ProtonNetServer.WsServer, and XmobiTea.ProtonNetServer.WssServer.

◆ BroadcastAllAsync() [1/2]

bool XmobiTea.ProtonNetServer.IServer.BroadcastAllAsync ( byte[] buffer)

Broadcasts a message asynchronously to all connected clients.

Parameters
bufferThe message buffer to broadcast.
Returns
True if the message was broadcasted successfully; otherwise, false.

Implemented in XmobiTea.ProtonNetServer.SslServer, XmobiTea.ProtonNetServer.TcpServer, XmobiTea.ProtonNetServer.UdpServer, XmobiTea.ProtonNetServer.WsServer, and XmobiTea.ProtonNetServer.WssServer.

◆ BroadcastAllAsync() [2/2]

bool XmobiTea.ProtonNetServer.IServer.BroadcastAllAsync ( byte[] buffer,
int position,
int length )

Broadcasts a message asynchronously to all connected clients with a specified position and length.

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

Implemented in XmobiTea.ProtonNetServer.SslServer, XmobiTea.ProtonNetServer.TcpServer, XmobiTea.ProtonNetServer.UdpServer, XmobiTea.ProtonNetServer.WsServer, and XmobiTea.ProtonNetServer.WssServer.

◆ DisconnectAll()

bool XmobiTea.ProtonNetServer.IServer.DisconnectAll ( )

Disconnects all connected clients.

Returns
True if all clients were disconnected successfully; otherwise, false.

Implemented in XmobiTea.ProtonNetServer.SslServer, XmobiTea.ProtonNetServer.TcpServer, and XmobiTea.ProtonNetServer.UdpServer.

◆ GetNetworkStatistics()

IServerNetworkStatistics XmobiTea.ProtonNetServer.IServer.GetNetworkStatistics ( )

Gets the network statistics for the server.

Returns
An instance of IServerNetworkStatistics representing the network statistics.

Implemented in XmobiTea.ProtonNetServer.SslServer, XmobiTea.ProtonNetServer.TcpServer, and XmobiTea.ProtonNetServer.UdpServer.

◆ Restart()

bool XmobiTea.ProtonNetServer.IServer.Restart ( )

Restarts the server.

Returns
True if the server restarted successfully; otherwise, false.

Implemented in XmobiTea.ProtonNetServer.SslServer, XmobiTea.ProtonNetServer.TcpServer, and XmobiTea.ProtonNetServer.UdpServer.

◆ Start()

bool XmobiTea.ProtonNetServer.IServer.Start ( )

Starts the server.

Returns
True if the server started successfully; otherwise, false.

Implemented in XmobiTea.ProtonNetServer.SslServer, XmobiTea.ProtonNetServer.TcpServer, and XmobiTea.ProtonNetServer.UdpServer.

◆ Stop()

bool XmobiTea.ProtonNetServer.IServer.Stop ( )

Stops the server.

Returns
True if the server stopped successfully; otherwise, false.

Implemented in XmobiTea.ProtonNetServer.SslServer, XmobiTea.ProtonNetServer.TcpServer, and XmobiTea.ProtonNetServer.UdpServer.


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