![]() |
VR-Forces 5.0.2 Developer's Guide
|
This is used by the master to connect to slaves.
Public Types | |
| typedef std::list < DtTcpMessageClient * > | ClientList |
Public Member Functions | |
| DtTcpServer (DtDe &de, int port) | |
| ~DtTcpServer () | |
| bool | isListening () const |
| void | startListening () |
| void | stopListening () |
| int | numberOfConnections () |
| void | cleanupDisconnectedClients () |
| void | checkForMessages () |
| void | addClient (DtTcpMessageClient *) |
| const ClientList & | clients () const |
| void | deleteClient (DtTcpMessageClient *client, bool lostConnection=false) |
| DtTcpMessageClient * | findClient (const std::string &name) |
| void | deleteClients () |
Static Public Member Functions | |
| static void | setBlocking (int fd, bool blocking) |
Static Public Attributes | |
| static const std::string | theServerHandshake |
| static const std::string | theClientHandshake |
Protected Member Functions | |
| void | handleNewConnections () |
| void | buildSocketList () |
| void | processReads () |
Protected Attributes | |
| DtDe & | myDe |
| int | mySocket |
| int | myHighSocket |
| int | myPort |
| fd_set * | myReceiveSet |
| ClientList | myClients |
| DtMessageDispatcher & | myDispatcher |
| typedef std::list<DtTcpMessageClient*> makVrv::DtTcpServer::ClientList |
| makVrv::DtTcpServer::~DtTcpServer | ( | ) |
DTOR.
| bool makVrv::DtTcpServer::isListening | ( | ) | const |
Get whether the server is listening for connections.
| void makVrv::DtTcpServer::startListening | ( | ) |
Start listening.
| void makVrv::DtTcpServer::stopListening | ( | ) |
Stop listening.
| int makVrv::DtTcpServer::numberOfConnections | ( | ) |
Get the number of connections.
| void makVrv::DtTcpServer::cleanupDisconnectedClients | ( | ) |
Check for disconnected clients and delete them if they are disconnected.
| void makVrv::DtTcpServer::checkForMessages | ( | ) |
Check existing clients for new messages.
| void makVrv::DtTcpServer::addClient | ( | DtTcpMessageClient * | ) |
Manually Add a client. The client should already be connected.
| DtInvalidInput | if the pointer is null. |
| const ClientList& makVrv::DtTcpServer::clients | ( | ) | const |
Get the clients.
| void makVrv::DtTcpServer::deleteClient | ( | DtTcpMessageClient * | client, |
| bool | lostConnection = false |
||
| ) |
Manually Remove a client;.
| DtTcpMessageClient* makVrv::DtTcpServer::findClient | ( | const std::string & | name | ) |
Attempt to find a client based upon it's name.
| void makVrv::DtTcpServer::deleteClients | ( | ) |
Delete all clients.
Modify the blocking state of a socket.
|
protected |
Check for new connections.
|
protected |
Add a socket to listen for data.
|
protected |
Process reads.
|
static |
|
static |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |