|
Network Library Documentation
|
Main server logic class, responsible for all server-managing actions. More...
Static Public Member Functions | |
| static void | StartServer (int CCU, int port, DefaultNetworkSettings defaultSettings, ServerSettings serverSettings) |
| Initializes and starts the server, including TCP/UDP listeners and packet handlers. | |
| static void | StopServer () |
| Stops the server and closes all TCP and UDP connections. | |
| static void | PacketAction (int packetId, Packet packet, int fromClient) |
| Method responsible for managing received Packet.ClientPackets actions that are written in ServerReceiveHandler class. Can be easily extended for new packet types. | |
| static void | SendUDPData (IPEndPoint clientEndPoint, Packet sendPacket) |
| Sends a UDP packet to the specified client endpoint. | |
| static DefaultNetworkSettings | GetSettings () |
| static ServerSettings | GetServerSettings () |
| static void | ConsoleLog (string message) |
| Logs a message to the console with a newline. | |
Static Public Attributes | |
| static Dictionary< int, ServerSideClient > | clientsList = new Dictionary<int, ServerSideClient>() |
| A dictionary holding all connected clients, indexed by their client ID. | |
| static int | maxCCU |
| Maximum number of concurrent users allowed on the server. | |
| static int | listeningPort |
| Port number the server listens on for incoming connections. | |
| static X509Certificate2 | serverCertificate |
| TLS certificate used for secure communication, if enabled. | |
Static Private Member Functions | |
| static void | InitializeClientsList () |
| Initializes the client list. | |
| static void | TcpConnectCallback (IAsyncResult result) |
| Callback for handling new TCP client connections asynchronously. Assigns the client to the first available slot. | |
| static void | UdpReceiveCallback (IAsyncResult result) |
| Callback for processing incoming UDP data packets from clients. | |
Static Private Attributes | |
| static TcpListener | tcpListener |
| TCP listener for handling incoming TCP connections. | |
| static UdpClient | udpListener |
| UDP listener for handling incoming UDP packets. | |
| static DefaultNetworkSettings | DefaultSettings |
| Default network configuration settings for the server. | |
| static ServerSettings | ServerSettings |
| Advanced server-side settings used during initialization. | |
Main server logic class, responsible for all server-managing actions.
Definition at line 12 of file ServerLogic.cs.
|
static |
Logs a message to the console with a newline.
Definition at line 250 of file ServerLogic.cs.
|
static |
Definition at line 243 of file ServerLogic.cs.
|
static |
Definition at line 238 of file ServerLogic.cs.
|
staticprivate |
Initializes the client list.
Definition at line 104 of file ServerLogic.cs.
|
static |
Method responsible for managing received Packet.ClientPackets actions that are written in ServerReceiveHandler class. Can be easily extended for new packet types.
Definition at line 114 of file ServerLogic.cs.
|
static |
Sends a UDP packet to the specified client endpoint.
Definition at line 223 of file ServerLogic.cs.
|
static |
Initializes and starts the server, including TCP/UDP listeners and packet handlers.
Ability to use tunelling alternative to webserver (for example playit.gg service)
Definition at line 50 of file ServerLogic.cs.
|
static |
Stops the server and closes all TCP and UDP connections.
Definition at line 94 of file ServerLogic.cs.
|
staticprivate |
Callback for handling new TCP client connections asynchronously. Assigns the client to the first available slot.
Definition at line 171 of file ServerLogic.cs.
|
staticprivate |
Callback for processing incoming UDP data packets from clients.
Definition at line 191 of file ServerLogic.cs.
|
static |
A dictionary holding all connected clients, indexed by their client ID.
Definition at line 17 of file ServerLogic.cs.
|
staticprivate |
Default network configuration settings for the server.
Definition at line 41 of file ServerLogic.cs.
|
static |
Port number the server listens on for incoming connections.
Definition at line 25 of file ServerLogic.cs.
|
static |
Maximum number of concurrent users allowed on the server.
Definition at line 21 of file ServerLogic.cs.
|
static |
TLS certificate used for secure communication, if enabled.
Definition at line 37 of file ServerLogic.cs.
|
staticprivate |
Advanced server-side settings used during initialization.
Definition at line 45 of file ServerLogic.cs.
|
staticprivate |
TCP listener for handling incoming TCP connections.
Definition at line 29 of file ServerLogic.cs.
|
staticprivate |
UDP listener for handling incoming UDP packets.
Definition at line 33 of file ServerLogic.cs.