26 #ifndef __NETWORK__TCP_SERVER_H__INCL__
27 #define __NETWORK__TCP_SERVER_H__INCL__
Simple wrapper for sockets.
void WaitLoop()
Waits for worker thread to terminate.
void TCPServerLoop()
Loop for worker threads.
BaseTCPServer()
Creates empty TCP server.
void AddConnection(X *con)
Adds connection to the queue.
A lock for a Lockable object.
Common wrapper for platform-specific mutexes.
void SafeDelete(T *&p)
Deletes and nullifies a pointer.
void ListenNewConnections()
Accepts all new connections.
void Close()
Stops started listening.
bool Open(uint16 port, char *errbuf=0)
Start listening on specified port.
virtual ~BaseTCPServer()
Cleans server up.
X * PopConnection()
Pops connection from queue.
Connection-type-dependent version of TCP server.
const uint32 TCPSRV_ERRBUF_SIZE
virtual void CreateNewConnection(Socket *sock, uint32 rIP, uint16 rPort)=0
Processes new connection.
void StartLoop()
Starts worker thread.
Generic class for TCP server.
~TCPServer()
Deletes all stored connections.
virtual bool Process()
Does periodical stuff to keep the server alive.
const uint32 TCPSRV_LOOP_GRANULARITY