VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes
makVrf::DtDebugDrawRenderer Class Reference

the DtDebugDrawRenderer is the network server for receiving and sending messages to attached clients. More...

Public Member Functions

 DtDebugDrawRenderer (DtDebugDrawRendererDriver &driver, int port=DtDisplayPort, bool allowMultiple=false)
 
virtual ~DtDebugDrawRenderer ()
 
virtual void initializeServer ()
 initialize and shutdown the TCP server More...
 
virtual void shutdownServer ()
 
virtual void setPort (int port)
 Set the port the server will listen on. More...
 
virtual int port () const
 Get the port the server has been configured to use. More...
 
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. More...
 
virtual DtBaseMessagenextMessage ()
 Gets the next message from the connections, returns NULL if there are no more messages. More...
 

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)
 Handle a sockets connecting and disconnecting. More...
 
virtual bool handleSocketRemoval (DtInetSocket *socket)
 

Static Protected Member Functions

static bool socketAdditionCallback (DtInetSocket *sock, void *usr)
 VR-Link callback when a connection is initiated. More...
 
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. More...
 

Protected Attributes

DtDebugDrawRendererDrivermyDriver
 
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
 

Detailed Description

the DtDebugDrawRenderer is the network server for receiving and sending messages to attached clients.

Member Typedef Documentation

typedef std::map<std::string, DtInetTcpSocket*> makVrf::DtDebugDrawRenderer::ClientRequestMap
protected
typedef std::list<DtInetTcpSocket*> makVrf::DtDebugDrawRenderer::ClientSocketList
protected

Constructor & Destructor Documentation

makVrf::DtDebugDrawRenderer::DtDebugDrawRenderer ( DtDebugDrawRendererDriver driver,
int  port = DtDisplayPort,
bool  allowMultiple = false 
)
virtual makVrf::DtDebugDrawRenderer::~DtDebugDrawRenderer ( )
virtual

Member Function Documentation

virtual void makVrf::DtDebugDrawRenderer::initializeServer ( )
virtual

initialize and shutdown the TCP server

virtual void makVrf::DtDebugDrawRenderer::shutdownServer ( )
virtual
virtual void makVrf::DtDebugDrawRenderer::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 makVrf::DtDebugDrawRenderer::port ( ) const
virtual

Get the port the server has been configured to use.

virtual void makVrf::DtDebugDrawRenderer::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* makVrf::DtDebugDrawRenderer::nextMessage ( )
virtual

Gets the next message from the connections, returns NULL if there are no more messages.

static double makVrf::DtDebugDrawRenderer::defaultHeartbeatTimeout ( )
static
static void makVrf::DtDebugDrawRenderer::setDefaultHeatbeatTimeout ( double  val)
static
virtual bool makVrf::DtDebugDrawRenderer::handleSocketAddition ( DtInetSocket *  socket)
protectedvirtual

Handle a sockets connecting and disconnecting.

virtual bool makVrf::DtDebugDrawRenderer::handleSocketRemoval ( DtInetSocket *  socket)
protectedvirtual
static bool makVrf::DtDebugDrawRenderer::socketAdditionCallback ( DtInetSocket *  sock,
void *  usr 
)
staticprotected

VR-Link callback when a connection is initiated.

Calls handleSocketAddition() and handleSocketRemoval() respectively

static bool makVrf::DtDebugDrawRenderer::socketRemovalCallback ( DtInetSocket *  sock,
void *  usr 
)
staticprotected
static void makVrf::DtDebugDrawRenderer::workerFunction ( void *  usr,
volatile bool stop 
)
staticprotected

Function that will be called when the network worker thread is started.

Member Data Documentation

DtDebugDrawRendererDriver& makVrf::DtDebugDrawRenderer::myDriver
protected
DtLocklessQueue<DtBaseMessage*> makVrf::DtDebugDrawRenderer::myOutgoingQueue
protected
DtLocklessQueue<DtBaseMessage*> makVrf::DtDebugDrawRenderer::myIncomingQueue
protected
DtInetSocketMgr* makVrf::DtDebugDrawRenderer::mySocketManager
protected
int makVrf::DtDebugDrawRenderer::myPort
protected
bool makVrf::DtDebugDrawRenderer::myAllowMultipleClients
protected
DtThread* makVrf::DtDebugDrawRenderer::myWorkerThread
protected
bool makVrf::DtDebugDrawRenderer::myShouldQuit
protected
double makVrf::DtDebugDrawRenderer::theDefaultHeatbeatTimeout
staticprotected
ClientRequestMap makVrf::DtDebugDrawRenderer::myClientRequestMap
protected
ClientSocketList makVrf::DtDebugDrawRenderer::myClientSockets
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)