VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes
DtTcpForwarder Class Reference
+ Collaboration diagram for DtTcpForwarder:

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 ( int  port = DtDEFAULT_PORT)
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 ( )
inlinevirtual

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 ( )
inlinevirtual
virtual DtTcpSocketMgr* DtTcpForwarder::socketMgr ( )
virtual

Member Data Documentation

DtListItem* DtTcpForwarder::myBeginItem
protected
DtTcpSocket* DtTcpForwarder::myBeginSocket
protected
DtClock DtTcpForwarder::myClock
protected
DtTcpSocketMgr* DtTcpForwarder::mySocketMgr
protected
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 Fri Dec 2 02:42:08 EST 2016 from SVN revision 171416
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)