![]() |
VR-Link API Documentation for HLA Evolved
|
ClientSocket uses the vrlink packet server to read and write packets The destination address (incl. More...
Inheritance diagram for DtClientSocket:
Collaboration diagram for DtClientSocket:Public Member Functions | |
| DtClientSocket (int port, int recvQSize=DtCsQDefaultSize, unsigned short csFlags=DtCsFlagsDefault) | |
| DtClientSocket (int port, DtIpv4Addr destAddr, int recvQSize=DtCsQDefaultSize, unsigned short csFlags=DtCsFlagsDefault) | |
| ~DtClientSocket () | |
| int | sendTo (caddr_t packet, size_t size, DtIpv4Addr addr) |
| sendTo is a pure virtual function which subclasses should impliment to take packets and place them on a network interface. | |
| int | DtRecv (caddr_t, size_t) |
| int | DtRecv (caddr_t *buffptr, int *status=NULL) |
| This is slower as it does a memcpy(). | |
| int | listenToMulticastGroup (DtIpv4Addr multicastAddr) |
| int | dropMulticastGroup (DtIpv4Addr multicastAddr) |
| int | setMcastTtl (int ttl) |
| void | setUnbundling (int onOff) |
| DtIpv4Addr | lastSourceInetAddr () |
| int isUnbundling(); Is not currently implemented. | |
| void | DtBecomeNonBlocking (void) |
| int | readFd () |
| Get the file descriptor for reading and writing to this socket. | |
| int | writeFd () |
| virtual bool | isOk () const |
| bool | isInternal () |
| void | setPsMsgTimeout (int seconds) |
| void | notifyMe () |
| void | disconnectFromServer () |
| void | setPacketServerInternal () |
| void | setPacketServerExternal () |
| void | pingClients () |
| void | testClients () |
| void | terminatePacketServer () |
| void | requestServerState () |
| void | requestServerCStates () |
| void | setPacketServerUnbundling (int onOff) |
Public Attributes | |
| DtTime | psMsgTimeout |
Protected Member Functions | |
| void | init (int port, DtIpv4Addr destAddr, int recvQSize, unsigned short csFlags) |
| int | timedRecv (caddr_t buf, size_t size, char *psKind) |
| void | drainNotifySocket () |
| void | checkGoAway () |
Protected Attributes | |
| DtNetSocket * | netSock |
| bool | notifyPending |
| bool | myOkFlag |
| int | recvFd |
| int | sendFd |
| long | clientId |
Private Member Functions | |
| void | processControlMsg (DtCsMsg *msg) |
| DtCsMsg * | getPsMsg (DtCsMsg *buf, char desiredKind) |
| void | cleanup (void) |
Private Attributes | |
| DtIpv4Addr | destAddr |
| char | clientSocketPath [DtCsClientPathSize] |
| int | serverPort |
| bool | internal |
| DtIpv4Addr | sourceAddr |
| DtNetFloat64 * | pktBuff8 |
| char * | shmAddr |
ClientSocket uses the vrlink packet server to read and write packets The destination address (incl.
broadcast vs. internal-mode) are controlled by the packet server.
Constructor differences with respect to NetSocket: The destAddr is determined by the packet server (aka vrlink-daemon). All ClientSockets are currently ReadWrite.
| DtClientSocket::DtClientSocket | ( | int | port, |
| int | recvQSize = DtCsQDefaultSize, |
||
| unsigned short | csFlags = DtCsFlagsDefault |
||
| ) |
| DtClientSocket::DtClientSocket | ( | int | port, |
| DtIpv4Addr | destAddr, | ||
| int | recvQSize = DtCsQDefaultSize, |
||
| unsigned short | csFlags = DtCsFlagsDefault |
||
| ) |
| void DtClientSocket::checkGoAway | ( | ) | [protected] |
| void DtClientSocket::cleanup | ( | void | ) | [private] |
| void DtClientSocket::disconnectFromServer | ( | ) |
| void DtClientSocket::drainNotifySocket | ( | ) | [protected] |
| int DtClientSocket::dropMulticastGroup | ( | DtIpv4Addr | multicastAddr | ) |
| void DtClientSocket::DtBecomeNonBlocking | ( | void | ) | [virtual] |
Reimplemented from DtSocket.
| int DtClientSocket::DtRecv | ( | caddr_t | buff, |
| size_t | |||
| ) | [virtual] |
| int DtClientSocket::DtRecv | ( | caddr_t * | buffptr, |
| int * | status = NULL |
||
| ) | [virtual] |
This is slower as it does a memcpy().
Implements DtSocket.
| DtCsMsg* DtClientSocket::getPsMsg | ( | DtCsMsg * | buf, |
| char | desiredKind | ||
| ) | [private] |
| void DtClientSocket::init | ( | int | port, |
| DtIpv4Addr | destAddr, | ||
| int | recvQSize, | ||
| unsigned short | csFlags | ||
| ) | [protected] |
| bool DtClientSocket::isInternal | ( | ) |
| bool DtClientSocket::isOk | ( | ) | const [inline, virtual] |
Reimplemented from DtSocket.
| DtIpv4Addr DtClientSocket::lastSourceInetAddr | ( | ) | [inline, virtual] |
int isUnbundling(); Is not currently implemented.
The answer depends on the state of the Packet Server.
Reimplemented from DtSocket.
| int DtClientSocket::listenToMulticastGroup | ( | DtIpv4Addr | multicastAddr | ) |
| void DtClientSocket::notifyMe | ( | ) | [virtual] |
Reimplemented from DtSocket.
| void DtClientSocket::pingClients | ( | ) |
| void DtClientSocket::processControlMsg | ( | DtCsMsg * | msg | ) | [private] |
| int DtClientSocket::readFd | ( | ) | [inline, virtual] |
| void DtClientSocket::requestServerCStates | ( | ) |
| void DtClientSocket::requestServerState | ( | ) |
| int DtClientSocket::sendTo | ( | caddr_t | packet, |
| size_t | size, | ||
| DtIpv4Addr | addr | ||
| ) | [virtual] |
sendTo is a pure virtual function which subclasses should impliment to take packets and place them on a network interface.
This function is called by DtSend which deals with bundling.
Implements DtSocket.
| int DtClientSocket::setMcastTtl | ( | int | ttl | ) | [inline, virtual] |
Reimplemented from DtSocket.
| void DtClientSocket::setPacketServerUnbundling | ( | int | onOff | ) |
| void DtClientSocket::setPsMsgTimeout | ( | int | seconds | ) |
| void DtClientSocket::setUnbundling | ( | int | onOff | ) | [virtual] |
Reimplemented from DtSocket.
| void DtClientSocket::testClients | ( | ) |
| int DtClientSocket::timedRecv | ( | caddr_t | buf, |
| size_t | size, | ||
| char * | psKind | ||
| ) | [protected] |
| int DtClientSocket::writeFd | ( | ) | [inline, virtual] |
Reimplemented from DtSocket.
long DtClientSocket::clientId [protected] |
char DtClientSocket::clientSocketPath[DtCsClientPathSize] [private] |
DtIpv4Addr DtClientSocket::destAddr [private] |
bool DtClientSocket::internal [private] |
bool DtClientSocket::myOkFlag [protected] |
DtNetSocket* DtClientSocket::netSock [protected] |
bool DtClientSocket::notifyPending [protected] |
DtNetFloat64* DtClientSocket::pktBuff8 [private] |
int DtClientSocket::recvFd [protected] |
int DtClientSocket::sendFd [protected] |
int DtClientSocket::serverPort [private] |
char* DtClientSocket::shmAddr [private] |
DtIpv4Addr DtClientSocket::sourceAddr [private] |