C# Класс BlottoBeats.Server.Server

Basic TCP Server Uses ThreadPool to handle multiple connections at the same time.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Main ( ) : void

Starts up the server

Приватные методы

Метод Описание
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

Описание методов

Main() публичный статический Метод

Starts up the server
public static Main ( ) : void
Результат void