MAK RTIspy API Documentation for HLA 1516
List of all members | Public Member Functions | Protected Attributes | Private Member Functions
DtTcpForwarder__vl__ Class Reference

Instances of the DtTcpForwarder__vl__ class manage TCP connections for variants of Forwarder (servers) which accept TCP connections. More...

+ Inheritance diagram for DtTcpForwarder__vl__:
+ Collaboration diagram for DtTcpForwarder__vl__:

Public Member Functions

 DtTcpForwarder__vl__ (int port, const DtInetAddr &networkInterface=DtInetAddr::inaddrAny())
 Constructor.
 DtTcpForwarder__vl__ ()
 Constructor which will NOT open up a socket manager.
virtual ~DtTcpForwarder__vl__ ()
 Destructor.
virtual void sendToAll (caddr_t packet, size_t size)
 Send a packet to all open TCP connections.
virtual void readAndForward (DtTime maxTimeOverAll, DtTime maxTimePerSocket)
 Retrieve all messages from each TCP connection and forward each to all other TCP connections.
virtual void readAndForward (DtTcpMsgSocket *sock, DtTime stopTime)
 Retrieve all messages from a single TCP connection and forward each to all other TCP connections, stopping when the clock reaches the specified stop time.
virtual DtTcpMsgSocketMgrsocketMgr ()
 Return a pointer to the socket manager object owned by this instance.

Protected Attributes

DtTcpMsgSocketMgrmySocketMgr
 Pointer to the socket manager object owned by this instance.
DtClock myClock
 Clock object used to meter processing time .
DtTcpMsgSocketmyBeginSock
 The socket to begin processing next time we readAndForwarder.

Private Member Functions

 DtTcpForwarder__vl__ (const DtTcpForwarder__vl__ &)
 Copy CTOR Not Implemented – Copy Not Allowed!
DtTcpForwarder__vl__operator= (const DtTcpForwarder__vl__ &)
 Assignment Operator Not Implemented – Assignment Not Allowed!

Detailed Description

Instances of the DtTcpForwarder__vl__ class manage TCP connections for variants of Forwarder (servers) which accept TCP connections.

Constructor & Destructor Documentation

DtTcpForwarder__vl__::DtTcpForwarder__vl__ ( int  port,
const DtInetAddr &  networkInterface = DtInetAddr::inaddrAny() 
)

Constructor.

Accepts port number and interface on which to listen for incoming client connections.

DtTcpForwarder__vl__::DtTcpForwarder__vl__ ( )

Constructor which will NOT open up a socket manager.

Instead, construction of the socket manager is left to a derived class.

DtTcpForwarder__vl__::~DtTcpForwarder__vl__ ( )
virtual

Destructor.

References mySocketMgr.

DtTcpForwarder__vl__::DtTcpForwarder__vl__ ( const DtTcpForwarder__vl__ )
private

Copy CTOR Not Implemented – Copy Not Allowed!

Member Function Documentation

DtTcpForwarder__vl__& DtTcpForwarder__vl__::operator= ( const DtTcpForwarder__vl__ )
private

Assignment Operator Not Implemented – Assignment Not Allowed!

void DtTcpForwarder__vl__::readAndForward ( DtTime  maxTimeOverAll,
DtTime  maxTimePerSocket 
)
virtual

Retrieve all messages from each TCP connection and forward each to all other TCP connections.

The amount of time spent processing each individual connection is limited by maxTimePerSocket and the total amount of time spent processing all connections is limited by maxTimeOverAll.

References DtTcpMsgSocket::isConnected(), myBeginSock, myClock, mySocketMgr, DtTcpMsgSocketMgr::removeAndDelete(), DtTcpMsgSocketMgr::socketIter(), and DtTcpMsgSocketMgr::socketSet().

void DtTcpForwarder__vl__::readAndForward ( DtTcpMsgSocket sock,
DtTime  stopTime 
)
virtual

Retrieve all messages from a single TCP connection and forward each to all other TCP connections, stopping when the clock reaches the specified stop time.

References DtTcpMsgSocket::flush(), myClock, DtTcpMsgSocket::recvMessage(), and sendToAll().

void DtTcpForwarder__vl__::sendToAll ( caddr_t  packet,
size_t  size 
)
virtual

Send a packet to all open TCP connections.

Reimplemented in DtFilteredTcpForwarder.

References DtTcpMsgSocket::isConnected(), mySocketMgr, DtTcpMsgSocket::sendMessage(), and DtTcpMsgSocketMgr::socketSet().

Referenced by readAndForward().

DtTcpMsgSocketMgr * DtTcpForwarder__vl__::socketMgr ( )
virtual

Return a pointer to the socket manager object owned by this instance.

References mySocketMgr.

Referenced by DtRtiMsgForwarder::closeAllConnectionsIfRequested(), DtRtiMsgForwarder::init(), and DtRtiMsgForwarder::requestKillSingleConnection().

Member Data Documentation

DtTcpMsgSocket* DtTcpForwarder__vl__::myBeginSock
protected

The socket to begin processing next time we readAndForwarder.

Referenced by DtFilteredTcpForwarder::DtFilteredTcpForwarder(), readAndForward(), and DtFilteredTcpForwarder::readAndForward().

DtClock DtTcpForwarder__vl__::myClock
protected

Clock object used to meter processing time .

Referenced by readAndForward(), and DtFilteredTcpForwarder::readAndForward().

DtTcpMsgSocketMgr* DtTcpForwarder__vl__::mySocketMgr
protected

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

Document ID: Generated on Tue May 7 16:26:47 EDT 2013 from SVN revision 126903
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)