EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
EVETCPServer Class Reference

EVE derivation of TCP server. More...

#include "EVETCPServer.h"

Inheritance diagram for EVETCPServer:
Collaboration diagram for EVETCPServer:

Protected Member Functions

virtual void CreateNewConnection (Socket *sock, uint32 rIP, uint16 rPort)
 Processes new connection. More...
 
- Protected Member Functions inherited from TCPServer< EVETCPConnection >
void AddConnection (EVETCPConnection *con)
 Adds connection to the queue. More...
 
- Protected Member Functions inherited from BaseTCPServer
void StartLoop ()
 Starts worker thread. More...
 
void WaitLoop ()
 Waits for worker thread to terminate. More...
 
virtual bool Process ()
 Does periodical stuff to keep the server alive. More...
 
void ListenNewConnections ()
 Accepts all new connections. More...
 
void TCPServerLoop ()
 Loop for worker threads. More...
 

Additional Inherited Members

- Public Member Functions inherited from TCPServer< EVETCPConnection >
 ~TCPServer ()
 Deletes all stored connections. More...
 
EVETCPConnectionPopConnection ()
 Pops connection from queue. More...
 
- Public Member Functions inherited from BaseTCPServer
 BaseTCPServer ()
 Creates empty TCP server. More...
 
virtual ~BaseTCPServer ()
 Cleans server up. More...
 
uint16 GetPort () const
 
bool IsOpen () const
 
bool Open (uint16 port, char *errbuf=0)
 Start listening on specified port. More...
 
void Close ()
 Stops started listening. More...
 
- Static Protected Member Functions inherited from BaseTCPServer
static void * TCPServerLoop (void *arg)
 Loop for worker threads. More...
 
- Protected Attributes inherited from TCPServer< EVETCPConnection >
Mutex mMQueue
 
std::queue< EVETCPConnection * > mQueue
 
- Protected Attributes inherited from BaseTCPServer
Mutex mMSock
 
SocketmSock
 
uint16 mPort
 
Mutex mMLoopRunning
 

Detailed Description

EVE derivation of TCP server.

Author
Zhur

Definition at line 36 of file EVETCPServer.h.

Member Function Documentation

virtual void EVETCPServer::CreateNewConnection ( Socket sock,
uint32  rIP,
uint16  rPort 
)
inlineprotectedvirtual

Processes new connection.

This function must be overloaded by children to process new connections. Called every time a new connection is accepted.

Implements BaseTCPServer.

Definition at line 39 of file EVETCPServer.h.

References TCPServer< EVETCPConnection >::AddConnection().

40  {
41  AddConnection( new EVETCPConnection( sock, rIP, rPort ) );
42  }
void AddConnection(EVETCPConnection *con)
Adds connection to the queue.
Definition: TCPServer.h:176
EVE derivation of TCP connection.

Here is the call graph for this function:


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