![]() |
VR-Forces 4.0.4 Class Documentation
|
This is used by the master to connect to slaves. More...
Public Types | |
| typedef std::list < DtTcpMessageClient * > | ClientList |
Public Member Functions | |
| DtTcpServer (DtDe &de, int port) | |
| CTOR. | |
| ~DtTcpServer () | |
| DTOR. | |
| bool | isListening () const |
| Get whether the server is listening for connections. | |
| void | startListening () |
| Start listening. | |
| void | stopListening () |
| Stop listening. | |
| int | numberOfConnections () |
| Get the number of connections. | |
| void | checkForMessages () |
| Check existing clients for new messages. | |
| void | addClient (DtTcpMessageClient *) |
| Manually Add a client. | |
| const ClientList & | clients () const |
| Get the clients. | |
| void | deleteClient (DtTcpMessageClient *) |
| Manually Remove a client;. | |
| DtTcpMessageClient * | findClient (const std::string &name) |
| Attempt to find a client based upon it's name. | |
| void | deleteClients () |
| Delete all clients. | |
Static Public Member Functions | |
| static void | setBlocking (int fd, bool blocking) |
| Modify the blocking state of a socket. | |
Static Public Attributes | |
| static const std::string | theServerHandshake |
| static const std::string | theClientHandshake |
Protected Member Functions | |
| void | handleNewConnections () |
| Check for new connections. | |
| void | buildSocketList () |
| Add a socket to listen for data. | |
| void | processReads () |
| Process reads. | |
Protected Attributes | |
| DtDe & | myDe |
| int | mySocket |
| int | myHighSocket |
| int | myPort |
| fd_set * | myReceiveSet |
| ClientList | myClients |
| DtMessageDispatcher & | myDispatcher |
This is used by the master to connect to slaves.
| typedef std::list<DtTcpMessageClient*> makVrv::DtTcpServer::ClientList |
| makVrv::DtTcpServer::DtTcpServer | ( | DtDe & | de, |
| int | port | ||
| ) |
CTOR.
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.
Get the number of connections.
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.
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.
| static void makVrv::DtTcpServer::setBlocking | ( | int | fd, |
| bool | blocking | ||
| ) | [static] |
Modify the blocking state of a socket.
| void makVrv::DtTcpServer::handleNewConnections | ( | ) | [protected] |
Check for new connections.
| void makVrv::DtTcpServer::buildSocketList | ( | ) | [protected] |
Add a socket to listen for data.
| void makVrv::DtTcpServer::processReads | ( | ) | [protected] |
Process reads.
const std::string makVrv::DtTcpServer::theServerHandshake [static] |
const std::string makVrv::DtTcpServer::theClientHandshake [static] |
DtDe& makVrv::DtTcpServer::myDe [protected] |
int makVrv::DtTcpServer::mySocket [protected] |
int makVrv::DtTcpServer::myHighSocket [protected] |
int makVrv::DtTcpServer::myPort [protected] |
fd_set* makVrv::DtTcpServer::myReceiveSet [protected] |
ClientList makVrv::DtTcpServer::myClients [protected] |
DtMessageDispatcher& makVrv::DtTcpServer::myDispatcher [protected] |