18 #include <vlutil/vlInetTcpSocket.h>
32 template <
typename Ret,
typename Param0>
50 virtual void connect(
const std::string& address,
int port =
DtDisplayPort,
const std::string& simAddress =
"",
bool attemptRetry=
true);
53 virtual void disconnect();
71 virtual void addConnectedCallback(
const DtConnectionDelegate& delegate);
73 virtual void removeConnectedCallback(
const DtConnectionDelegate& delegate);
76 virtual void addDisconnectedCallback(
const DtConnectionDelegate& delegate);
78 virtual void removeDisconnectedCallback(
const DtConnectionDelegate& delegate);
86 virtual unsigned int nextId();
90 virtual std::string& requesterName();
93 static double defaultRetryTimeout();
95 static void setDefaultRetryTimeout(
double val);
98 static double defaultHeartbeatTimeout();
100 static void setDefaultHeatbeatTimeout(
double val);
103 DtInetAddr findFirstNetworkDeviceAddress(
bool& found)
const;
125 static void workerFunction(
void* data,
volatile bool* stop);
#define DT_DLL_DEBUGDRAWCONNECTOR
Definition: export.h:15
The DtDebugDrawConnector class manages the connection with the server and provides and interface to s...
Definition: vrfDebugDrawConnector.h:37
int myPort
Definition: vrfDebugDrawConnector.h:123
unsigned int myNextId
Definition: vrfDebugDrawConnector.h:111
virtual DtMessageFactory & messageFactory()
Gets the message factory for all messages. The user can add new message decoders to this factory...
Definition: vrfDebugDrawConnector.h:82
DtBaseMessage is the base class for all messages that can be sent between the server and the client...
Definition: vrfMessage.h:25
static double theDefaultHeatbeatTimeout
Definition: vrfDebugDrawConnector.h:128
DtLocklessQueue< DtBaseMessage * > myIncomingQueue
Definition: vrfDebugDrawConnector.h:115
Delegate template for binding static or member functions for callback at later time The return type a...
Definition: delegate.h:115
static double theDefaultRetryTimeout
Definition: vrfDebugDrawConnector.h:129
std::list< DtConnectionDelegate > myDisconnectionCallbacks
Definition: vrfDebugDrawConnector.h:108
std::string myAddress
Definition: vrfDebugDrawConnector.h:121
DtMessageFactory myMessageFactory
Definition: vrfDebugDrawConnector.h:110
DtThread * myWorkerThread
Definition: vrfDebugDrawConnector.h:116
virtual DtMessageHandler & messageHandler()
Get the message handler the connector is using to dispatch messages when they arrive users will regis...
Definition: vrfDebugDrawConnector.h:68
DtDelegate< void, DtDebugDrawConnector * > DtConnectionDelegate
Connection callback definition.
Definition: vrfDebugDrawConnector.h:41
Defines a message factory for creating DtBaseMessage classes from an array of bytes.
DtMessageHandler myMessageHandler
Definition: vrfDebugDrawConnector.h:105
std::string myRequestorName
Definition: vrfDebugDrawConnector.h:112
Defines a class for storing message delegates.
bool myShouldQuit
Definition: vrfDebugDrawConnector.h:126
bool myShouldRetryConnect
Definition: vrfDebugDrawConnector.h:119
double myRetryTimeout
Definition: vrfDebugDrawConnector.h:120
const int DtDisplayPort
the default port the server application is listening on
Definition: vrfDebugDrawConnector.h:28
DtLocklessQueue< DtBaseMessage * > myOutgoingQueue
Definition: vrfDebugDrawConnector.h:114
std::string mySimAddress
Definition: vrfDebugDrawConnector.h:122
the DtMessageFactory class
Definition: vrfMessageFactory.h:26
DtLocklessQueue is a thread safe queue for single reader/single writer. It may block if the queue fil...
Definition: locklessQueue.h:20
DtMessageHandler manages message delegates. More than one delegate may be registered for a given mess...
Definition: vrfMessageHandler.h:27
std::list< DtConnectionDelegate > myConnectionCallbacks
Definition: vrfDebugDrawConnector.h:107
DtInetTcpSocket * mySocket
Definition: vrfDebugDrawConnector.h:117