18 #include <vlutil/vlInetTcpSocket.h>
23 class DtExerciseConnection;
33 template <
typename Ret,
typename Param0>
51 virtual void connect(
const std::string& address,
int port =
DtDisplayPort,
const std::string& simAddress =
"",
bool attemptRetry=
true);
54 virtual void disconnect();
72 virtual void addConnectedCallback(
const DtConnectionDelegate& delegate);
74 virtual void removeConnectedCallback(
const DtConnectionDelegate& delegate);
77 virtual void addDisconnectedCallback(
const DtConnectionDelegate& delegate);
79 virtual void removeDisconnectedCallback(
const DtConnectionDelegate& delegate);
87 virtual unsigned int nextId();
91 virtual std::string& requesterName();
94 static double defaultRetryTimeout();
96 static void setDefaultRetryTimeout(
double val);
99 static double defaultHeartbeatTimeout();
101 static void setDefaultHeatbeatTimeout(
double val);
104 DtInetAddr findFirstNetworkDeviceAddress(
bool& found)
const;
126 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:38
int myPort
Definition: vrfDebugDrawConnector.h:124
unsigned int myNextId
Definition: vrfDebugDrawConnector.h:112
virtual DtMessageFactory & messageFactory()
Gets the message factory for all messages.
Definition: vrfDebugDrawConnector.h:83
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:129
DtLocklessQueue< DtBaseMessage * > myIncomingQueue
Definition: vrfDebugDrawConnector.h:116
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:130
std::list< DtConnectionDelegate > myDisconnectionCallbacks
Definition: vrfDebugDrawConnector.h:109
std::string myAddress
Definition: vrfDebugDrawConnector.h:122
DtMessageFactory myMessageFactory
Definition: vrfDebugDrawConnector.h:111
DtThread * myWorkerThread
Definition: vrfDebugDrawConnector.h:117
virtual DtMessageHandler & messageHandler()
Get the message handler the connector is using to dispatch messages when they arrive users will regis...
Definition: vrfDebugDrawConnector.h:69
DtDelegate< void, DtDebugDrawConnector * > DtConnectionDelegate
Connection callback definition.
Definition: vrfDebugDrawConnector.h:42
Defines a message factory for creating DtBaseMessage classes from an array of bytes.
DtMessageHandler myMessageHandler
Definition: vrfDebugDrawConnector.h:106
std::string myRequestorName
Definition: vrfDebugDrawConnector.h:113
Defines a class for storing message delegates.
bool myShouldQuit
Definition: vrfDebugDrawConnector.h:127
bool myShouldRetryConnect
Definition: vrfDebugDrawConnector.h:120
double myRetryTimeout
Definition: vrfDebugDrawConnector.h:121
const int DtDisplayPort
the default port the server application is listening on
Definition: vrfDebugDrawConnector.h:29
DtLocklessQueue< DtBaseMessage * > myOutgoingQueue
Definition: vrfDebugDrawConnector.h:115
std::string mySimAddress
Definition: vrfDebugDrawConnector.h:123
the DtMessageFactory class
Definition: vrfMessageFactory.h:26
DtLocklessQueue is a thread safe queue for single reader/single writer.
Definition: locklessQueue.h:20
DtMessageHandler manages message delegates.
Definition: vrfMessageHandler.h:27
std::list< DtConnectionDelegate > myConnectionCallbacks
Definition: vrfDebugDrawConnector.h:108
DtInetTcpSocket * mySocket
Definition: vrfDebugDrawConnector.h:118