VR-Link API Documentation for DIS
Public Member Functions | Protected Attributes
DtTcpForwarder Class Reference
+ Collaboration diagram for DtTcpForwarder:

List of all members.

Public Member Functions

 DtTcpForwarder (int port=DtDEFAULT_PORT)
 DtTcpForwarder (DtSocketCreationCallback cb, void *socketCreator, int port=DtDEFAULT_PORT)
 Constructor.
virtual ~DtTcpForwarder ()
virtual void sendToAll (caddr_t packet, size_t size)
virtual void readAndForward (DtTime maxTimeOverAll, DtTime maxTimePerSocket)
virtual void readAndForward (DtTcpSocket *sock, DtTime stopTime)
 Read packets from sock, and forward them to all sockets in the list.
virtual DtTcpSocketMgrsocketMgr ()
virtual int sizeLength ()
 Sets TcpSockManager's offset and length so that it can create sockets whose lengthOffset and lengthSize are different from the default values.
virtual int sizeOffset ()
virtual void setSizeLength (int offset)
virtual void setSizeOffset (int length)

Protected Attributes

DtTcpSocketMgrmySocketMgr
DtTcpSocketmyBeginSocket
DtListItemmyBeginItem
DtClock myClock
const DtListmySockList
 Pointer to the socket manager's list.

Constructor & Destructor Documentation

DtTcpForwarder::DtTcpForwarder ( DtSocketCreationCallback  cb,
void *  socketCreator,
int  port = DtDEFAULT_PORT 
)

Constructor.

Accepts socket creator callback function pointer, a pointer to the object that will create said socket, and the port number which said socket will listen on. This ctor allows the parent class of a DtTcpForwarder object to create specialized sockets (such as compression-enabled TCP sockets).

virtual DtTcpForwarder::~DtTcpForwarder ( ) [virtual]

Member Function Documentation

virtual void DtTcpForwarder::readAndForward ( DtTime  maxTimeOverAll,
DtTime  maxTimePerSocket 
) [virtual]
virtual void DtTcpForwarder::readAndForward ( DtTcpSocket sock,
DtTime  stopTime 
) [virtual]

Read packets from sock, and forward them to all sockets in the list.

Stop reading when current time reaches stopTime.

virtual void DtTcpForwarder::sendToAll ( caddr_t  packet,
size_t  size 
) [virtual]
virtual void DtTcpForwarder::setSizeLength ( int  offset) [virtual]
virtual void DtTcpForwarder::setSizeOffset ( int  length) [virtual]
int DtTcpForwarder::sizeLength ( ) [inline, virtual]

Sets TcpSockManager's offset and length so that it can create sockets whose lengthOffset and lengthSize are different from the default values.

int DtTcpForwarder::sizeOffset ( ) [inline, virtual]
virtual DtTcpSocketMgr* DtTcpForwarder::socketMgr ( ) [virtual]

Member Data Documentation

const DtList* DtTcpForwarder::mySockList [protected]

Pointer to the socket manager's list.


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)