The DtDebugDrawConnector class manages the connection with the server and provides and interface to send and receive messages with the server.
More...
The DtDebugDrawConnector class manages the connection with the server and provides and interface to send and receive messages with the server.
Connection callback definition.
| makVrf::DtDebugDrawConnector::DtDebugDrawConnector |
( |
| ) |
|
| virtual makVrf::DtDebugDrawConnector::~DtDebugDrawConnector |
( |
| ) |
|
|
virtual |
| virtual void makVrf::DtDebugDrawConnector::connect |
( |
const std::string & |
address, |
|
|
int |
port = DtDisplayPort, |
|
|
const std::string & |
simAddress = "", |
|
|
bool |
attemptRetry = true |
|
) |
| |
|
virtual |
this establishes a connection to a remote RadarFX server at a given address and port the connection callback will be run when a connection is made.
It will continue to retry if there is a failure to connect or the connector gets disconnected if attemptRetry is true
| virtual void makVrf::DtDebugDrawConnector::disconnect |
( |
| ) |
|
|
virtual |
Disconnects from a RadarFX server.
| virtual bool makVrf::DtDebugDrawConnector::isOk |
( |
| ) |
|
|
virtual |
Returns true of the connection has succeed and is valid.
| virtual void makVrf::DtDebugDrawConnector::tick |
( |
| ) |
|
|
virtual |
Tick must be called periodically to allow message callbacks to be run.
| virtual void makVrf::DtDebugDrawConnector::sendMessage |
( |
DtBaseMessage & |
request | ) |
|
|
virtual |
Sends a message to the server Application.
A copy of the message is made internally, so the message being sent can go out of scope immediately after sendMessage is called.
Get the message handler the connector is using to dispatch messages when they arrive users will register their delegates with the message handler to execute their code when a message is received.
| virtual void makVrf::DtDebugDrawConnector::addConnectedCallback |
( |
const DtConnectionDelegate & |
delegate | ) |
|
|
virtual |
Adds a callback for when a connection to a server succeeds.
| virtual void makVrf::DtDebugDrawConnector::removeConnectedCallback |
( |
const DtConnectionDelegate & |
delegate | ) |
|
|
virtual |
Removes connection callback.
| virtual void makVrf::DtDebugDrawConnector::addDisconnectedCallback |
( |
const DtConnectionDelegate & |
delegate | ) |
|
|
virtual |
Adds a callback for when disconnected to a server.
| virtual void makVrf::DtDebugDrawConnector::removeDisconnectedCallback |
( |
const DtConnectionDelegate & |
delegate | ) |
|
|
virtual |
Removes disconnection callback.
Gets the message factory for all messages.
The user can add new message decoders to this factory
| virtual unsigned int makVrf::DtDebugDrawConnector::nextId |
( |
| ) |
|
|
virtual |
You can use this to get the next id for a message if your callback system needs to keep track of responses if any message being sent leaves the id field as 0, this function will be used to generate an id.
| virtual std::string& makVrf::DtDebugDrawConnector::requesterName |
( |
| ) |
|
|
virtual |
this provides a unique name for the requester.
It is generated from the IP address and PID of the running application if any message being sent leaves the requester field blank, this function will be used to generate a requester names
| static double makVrf::DtDebugDrawConnector::defaultRetryTimeout |
( |
| ) |
|
|
static |
The default timeout for retrying. The default value is 5.
| static void makVrf::DtDebugDrawConnector::setDefaultRetryTimeout |
( |
double |
val | ) |
|
|
static |
Sets the default retry timout. Value is in seconds.
| static double makVrf::DtDebugDrawConnector::defaultHeartbeatTimeout |
( |
| ) |
|
|
static |
the default hearbeat timeout. The default is 2.5 seconds.
| static void makVrf::DtDebugDrawConnector::setDefaultHeatbeatTimeout |
( |
double |
val | ) |
|
|
static |
sets the default heartbeat timeout. Value is in seconds.
| DtInetAddr makVrf::DtDebugDrawConnector::findFirstNetworkDeviceAddress |
( |
bool & |
found | ) |
const |
|
protected |
| static void makVrf::DtDebugDrawConnector::workerFunction |
( |
void * |
data, |
|
|
volatile bool * |
stop |
|
) |
| |
|
staticprotected |
| std::string makVrf::DtDebugDrawConnector::myRequestorName |
|
protected |
| DtThread* makVrf::DtDebugDrawConnector::myWorkerThread |
|
protected |
| DtInetTcpSocket* makVrf::DtDebugDrawConnector::mySocket |
|
protected |
| bool makVrf::DtDebugDrawConnector::myShouldRetryConnect |
|
protected |
| double makVrf::DtDebugDrawConnector::myRetryTimeout |
|
protected |
| std::string makVrf::DtDebugDrawConnector::myAddress |
|
protected |
| std::string makVrf::DtDebugDrawConnector::mySimAddress |
|
protected |
| int makVrf::DtDebugDrawConnector::myPort |
|
protected |
| bool makVrf::DtDebugDrawConnector::myShouldQuit |
|
protected |
| double makVrf::DtDebugDrawConnector::theDefaultHeatbeatTimeout |
|
staticprotected |
| double makVrf::DtDebugDrawConnector::theDefaultRetryTimeout |
|
staticprotected |
The documentation for this class was generated from the following file: