VR-Link API Documentation for HLA Evolved
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes

ClientSocket uses the vrlink packet server to read and write packets The destination address (incl. More...

+ Inheritance diagram for DtClientSocket:
+ Collaboration diagram for DtClientSocket:

List of all members.

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

DtNetSocketnetSock
bool notifyPending
bool myOkFlag
int recvFd
int sendFd
long clientId

Private Member Functions

void processControlMsg (DtCsMsg *msg)
DtCsMsggetPsMsg (DtCsMsg *buf, char desiredKind)
void cleanup (void)

Private Attributes

DtIpv4Addr destAddr
char clientSocketPath [DtCsClientPathSize]
int serverPort
bool internal
DtIpv4Addr sourceAddr
DtNetFloat64pktBuff8
char * shmAddr

Detailed Description

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.


Constructor & Destructor Documentation

DtClientSocket::DtClientSocket ( int  port,
int  recvQSize = DtCsQDefaultSize,
unsigned short  csFlags = DtCsFlagsDefault 
)
DtClientSocket::DtClientSocket ( int  port,
DtIpv4Addr  destAddr,
int  recvQSize = DtCsQDefaultSize,
unsigned short  csFlags = DtCsFlagsDefault 
)

Member Function Documentation

void DtClientSocket::checkGoAway ( ) [protected]
void DtClientSocket::cleanup ( void  ) [private]
void DtClientSocket::drainNotifySocket ( ) [protected]
void DtClientSocket::DtBecomeNonBlocking ( void  ) [virtual]

Reimplemented from DtSocket.

int DtClientSocket::DtRecv ( caddr_t  buff,
size_t   
) [virtual]
See also:
DtRecv(caddr_t *buffptr, int *status=0)

Implements DtSocket.

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::isOk ( ) const [inline, virtual]

Reimplemented from DtSocket.

int isUnbundling(); Is not currently implemented.

The answer depends on the state of the Packet Server.

Reimplemented from DtSocket.

void DtClientSocket::notifyMe ( ) [virtual]

Reimplemented from DtSocket.

void DtClientSocket::processControlMsg ( DtCsMsg msg) [private]
int DtClientSocket::readFd ( ) [inline, virtual]

Get the file descriptor for reading and writing to this socket.

NOTE: Not all DtSocket have associated file descriptors. Those that do not will have readFd()/writeFd() return -1.

Reimplemented from DtSocket.

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::setPsMsgTimeout ( int  seconds)
void DtClientSocket::setUnbundling ( int  onOff) [virtual]

Reimplemented from DtSocket.

int DtClientSocket::timedRecv ( caddr_t  buf,
size_t  size,
char *  psKind 
) [protected]
int DtClientSocket::writeFd ( ) [inline, virtual]

Reimplemented from DtSocket.


Member Data Documentation

long DtClientSocket::clientId [protected]
bool DtClientSocket::internal [private]
bool DtClientSocket::myOkFlag [protected]
int DtClientSocket::recvFd [protected]
int DtClientSocket::sendFd [protected]
char* DtClientSocket::shmAddr [private]

The documentation for this class was generated from the following file:

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)