![]() |
VR-Forces Developer's Guide
|
the DtDebugDrawRenderer is the network server for receiving and sending messages to attached clients.
Public Member Functions | |
| DtDebugDrawRenderer (DtDebugDrawRendererDriver &driver, int port=DtDisplayPort, bool allowMultiple=false) | |
| virtual | ~DtDebugDrawRenderer () |
| virtual void | initializeServer () |
| virtual void | shutdownServer () |
| virtual void | setPort (int port) |
| virtual int | port () const |
| virtual void | sendMessage (DtBaseMessage &request) |
| virtual DtBaseMessage * | nextMessage () |
Static Public Member Functions | |
| static double | defaultHeartbeatTimeout () |
| static void | setDefaultHeatbeatTimeout (double val) |
Protected Types | |
| typedef std::map< std::string, DtInetTcpSocket * > | ClientRequestMap |
| typedef std::list < DtInetTcpSocket * > | ClientSocketList |
Protected Member Functions | |
| virtual bool | handleSocketAddition (DtInetSocket *socket) |
| virtual bool | handleSocketRemoval (DtInetSocket *socket) |
Static Protected Member Functions | |
| static bool | socketAdditionCallback (DtInetSocket *sock, void *usr) |
| static bool | socketRemovalCallback (DtInetSocket *sock, void *usr) |
| static void | workerFunction (void *usr, volatile bool *stop) |
Protected Attributes | |
| DtDebugDrawRendererDriver & | myDriver |
| DtLocklessQueue< DtBaseMessage * > | myOutgoingQueue |
| DtLocklessQueue< DtBaseMessage * > | myIncomingQueue |
| DtInetSocketMgr * | mySocketManager |
| int | myPort |
| bool | myAllowMultipleClients |
| DtThread * | myWorkerThread |
| bool | myShouldQuit |
| ClientRequestMap | myClientRequestMap |
| ClientSocketList | myClientSockets |
Static Protected Attributes | |
| static double | theDefaultHeatbeatTimeout |
|
protected |
|
protected |
| makVrf::DtDebugDrawRenderer::DtDebugDrawRenderer | ( | DtDebugDrawRendererDriver & | driver, |
| int | port = DtDisplayPort, |
||
| bool | allowMultiple = false |
||
| ) |
|
virtual |
|
virtual |
initialize and shutdown the TCP server
|
virtual |
|
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 |
Get the port the server has been configured to use.
|
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 |
Gets the next message from the connections, returns NULL if there are no more messages.
|
static |
|
static |
|
protectedvirtual |
Handle a sockets connecting and disconnecting.
|
protectedvirtual |
|
staticprotected |
VR-Link callback when a connection is initiated. Calls handleSocketAddition() and handleSocketRemoval() respectively.
|
staticprotected |
|
staticprotected |
Function that will be called when the network worker thread is started.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |