VR-Link API Documentation for HLA 1.3
Public Member Functions | Private Attributes
DtSocketPairSocket Class Reference
+ Inheritance diagram for DtSocketPairSocket:
+ Collaboration diagram for DtSocketPairSocket:

List of all members.

Public Member Functions

 DtSocketPairSocket ()
 DtSocketPairSocket (int sockNum)
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 recvWithStatus (caddr_t buffptr, size_t size, int *status=NULL)
int DtRecv (caddr_t *buffptr, int *status)
 DtReceiv is he function which VR-Link uses to read packets from the socket.
int DtRecv (caddr_t buff, size_t size)
void DtBecomeNonBlocking (void)
int otherFd ()
int readFd ()
 Get the file descriptor for reading and writing to this socket.
int writeFd ()

Private Attributes

int myFd
int ofd
char buffer [1500]

Constructor & Destructor Documentation


Member Function Documentation

void DtSocketPairSocket::DtBecomeNonBlocking ( void  ) [virtual]

Reimplemented from DtSocket.

int DtSocketPairSocket::DtRecv ( caddr_t *  buffptr,
int *  status 
) [virtual]

DtReceiv is he function which VR-Link uses to read packets from the socket.

Users who wish to provide another mechanisim, such as shared memory, or loopback, will need to impliment or override these functions to return new packets. Depending on the implementation in derived DtSockets, one of the forms of DtRecv may be faster than the other.

DtRecv has an optional status argument that could more elegantly be implemented as different return codes, but this would break older code.

Note:
If a derived class complains "... hides virtual DtRecv() ...", make sure you have BOTH overloads of DtRecv declared and defined in the subclass.

Implements DtSocket.

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

Implements DtSocket.

int DtSocketPairSocket::otherFd ( ) [inline]
int DtSocketPairSocket::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 DtSocketPairSocket::recvWithStatus ( caddr_t  buffptr,
size_t  size,
int *  status = NULL 
)
int DtSocketPairSocket::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 DtSocketPairSocket::writeFd ( ) [inline, virtual]

Reimplemented from DtSocket.


Member Data Documentation

char DtSocketPairSocket::buffer[1500] [private]
int DtSocketPairSocket::myFd [private]
int DtSocketPairSocket::ofd [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)