C# Class BlottoBeats.Server.Server

Basic TCP Server Uses ThreadPool to handle multiple connections at the same time.
Datei anzeigen Open project: Zwolf11/BlottoBeats Class Usage Examples

Public Methods

Method Description
Main ( ) : void

Starts up the server

Private Methods

Method Description
HandleConnectionWithClient ( object client ) : void

Child thread function. Handles a connection with a single client.

IsAlive ( ) : bool

Checks the health of the server

ListenForClients ( ) : void

Main server thread function. Accepts clients over TCP and uses ThreadPool to support multiple connections at the same time.

Log ( string message, IPAddress address, int level ) : void

Logs a message and the IP of the connected client

Log ( string message, int level ) : void

Logs a message

Restart ( ) : void

Restarts the server thread

Server ( int port, Database database, string logFileLocation, int logLevel ) : System

Creates a new server object that listens on the specified port

Start ( ) : int

Starts the server thread.

Stop ( ) : void

Stops the server thread

Timestamp ( ) : string

Gets the current time as a string

Method Details

Main() public static method

Starts up the server
public static Main ( ) : void
return void