the DtRadarFxServer is the network server for receving and sending messages to attached clients.
More...
Public Member Functions |
| | DtRadarFxServer (DtRadarFxDriver &driver, int port=4567, bool allowMultiple=false) |
| virtual | ~DtRadarFxServer () |
| virtual void | initializeServer () |
| | initialize and shutdown the TCP server
|
| virtual void | shutdownServer () |
| virtual void | setPort (int port) |
| | Set the port the server will listen on.
|
| virtual int | port () const |
| | Get the port the server has been configured to use.
|
| virtual void | sendMessage (DtBaseMessage &request) |
| | queue a message for sending a message to the client described in the message this function makes a copy of the message and the original message can go out of scope as soon as this function call ends.
|
| virtual DtBaseMessage * | nextMessage () |
| | Gets the next message from the connections, returns NULL if there are no more messages.
|
Static Protected Member Functions |
| static bool | socketAdditionCallback (DtInetSocket *sock, void *usr) |
| | VR-Link callback when a connection is initiated.
|
| static bool | socketRemovalCallback (DtInetSocket *sock, void *usr) |
| static void | workerFunction (void *usr, volatile bool *stop) |
| | Function that will be called when the network worker thread is started.
|
Detailed Description
the DtRadarFxServer is the network server for receving and sending messages to attached clients.
Member Typedef Documentation
Constructor & Destructor Documentation
| makRadarFx::DtRadarFxServer::DtRadarFxServer |
( |
DtRadarFxDriver & |
driver, |
|
|
int |
port = 4567, |
|
|
bool |
allowMultiple = false |
|
) |
| |
| virtual makRadarFx::DtRadarFxServer::~DtRadarFxServer |
( |
| ) |
|
|
virtual |
Member Function Documentation
| virtual void makRadarFx::DtRadarFxServer::initializeServer |
( |
| ) |
|
|
virtual |
initialize and shutdown the TCP server
| virtual void makRadarFx::DtRadarFxServer::shutdownServer |
( |
| ) |
|
|
virtual |
| virtual void makRadarFx::DtRadarFxServer::setPort |
( |
int |
port | ) |
|
|
virtual |
Set the port the server will listen on.
This will restart the server if the new port value is different than the existing one
| virtual int makRadarFx::DtRadarFxServer::port |
( |
| ) |
const |
|
virtual |
Get the port the server has been configured to use.
| virtual void makRadarFx::DtRadarFxServer::sendMessage |
( |
DtBaseMessage & |
request | ) |
|
|
virtual |
queue a message for sending a message to the client described in the message this function makes a copy of the message and the original message can go out of scope as soon as this function call ends.
| virtual DtBaseMessage* makRadarFx::DtRadarFxServer::nextMessage |
( |
| ) |
|
|
virtual |
Gets the next message from the connections, returns NULL if there are no more messages.
| static double makRadarFx::DtRadarFxServer::defaultHeartbeatTimeout |
( |
| ) |
|
|
static |
| static void makRadarFx::DtRadarFxServer::setDefaultHeatbeatTimeout |
( |
double |
val | ) |
|
|
static |
| virtual bool makRadarFx::DtRadarFxServer::handleSocketAddition |
( |
DtInetSocket * |
socket | ) |
|
|
protectedvirtual |
Handle a sockets connecting and disconnecting.
| virtual bool makRadarFx::DtRadarFxServer::handleSocketRemoval |
( |
DtInetSocket * |
socket | ) |
|
|
protectedvirtual |
| static bool makRadarFx::DtRadarFxServer::socketAdditionCallback |
( |
DtInetSocket * |
sock, |
|
|
void * |
usr |
|
) |
| |
|
staticprotected |
| static bool makRadarFx::DtRadarFxServer::socketRemovalCallback |
( |
DtInetSocket * |
sock, |
|
|
void * |
usr |
|
) |
| |
|
staticprotected |
| static void makRadarFx::DtRadarFxServer::workerFunction |
( |
void * |
usr, |
|
|
volatile bool * |
stop |
|
) |
| |
|
staticprotected |
Function that will be called when the network worker thread is started.
Member Data Documentation
| DtInetSocketMgr* makRadarFx::DtRadarFxServer::mySocketManager |
|
protected |
| int makRadarFx::DtRadarFxServer::myPort |
|
protected |
| bool makRadarFx::DtRadarFxServer::myAllowMultipleClients |
|
protected |
| DtThread* makRadarFx::DtRadarFxServer::myWorkerThread |
|
protected |
| bool makRadarFx::DtRadarFxServer::myShouldQuit |
|
protected |
| double makRadarFx::DtRadarFxServer::theDefaultHeatbeatTimeout |
|
staticprotected |
The documentation for this class was generated from the following file: