VR-Forces Developer's Guide
 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.

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 DtBaseMessagenextMessage ()
 

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

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
 

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 Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)