![]() |
MAK RTIspy API Documentation for HLA Evolved
|
The DtForwarderPort is an Abstract Base Class which provides the interface to a collection of connections from which messages may be read and to which messages may be sent. More...
Inheritance diagram for DtInOutForwarderPort:
Collaboration diagram for DtInOutForwarderPort:Public Member Functions | |
| virtual | ~DtInOutForwarderPort () |
| virtual bool | isReady () const |
| Is the Port fully usable and available? | |
| virtual DtAddressMsgPair | getNextMsg () |
| Get the next message to forward and the source connection. | |
| virtual bool | getInitializationMsgs (DtForwarderPort::DtSocketSet &socks, std::list< DtAddressMsgPair > &msgs, bool printBeDestMetadata) |
| Get the next initialization messages off of a set of pending TCP sockets. | |
| virtual bool | getInitializationMsg (DtMsgSocket *sock, DtAddressMsgPair &msg, bool printBeDestMetadata) |
| Get the next initialization message off of a pending TCP socket. | |
| virtual void | sendByTransport (const DtForwarderMsg &msg) const |
| Check transport metadata and send message to appropriate destinations. | |
| virtual void | sendToAllReliable (const DtForwarderMsg &msg) const |
| Send a message to all available destinations. | |
| virtual void | sendToListReliable (const DtForwarderMsg &msg, const DtAddressPortList &destinations) const |
| Send a message to the specified list of destinations excluding the list of filtered destinations. | |
| virtual void | selectParams (MAKRti::DtSelectParamWithWrite &selectParams) |
| Add this port's current select() notification set to the passed set. | |
| virtual void | updateRoutes () |
| Handle changes to the Routing map. | |
| virtual void | processInitializationMessages () |
| virtual int | checkConnectionStatus (const DtInetAddrAndPort *target=0) |
| Test for lost connections - returns true if targeted connection is active or if no target specified returns false if at least one drop detected. | |
| virtual void | clearNeededConnections () |
| Clear the list of needed forwarder connections. | |
| virtual unsigned int | abortPendingConnections () |
| Abort any embryonic connections. | |
| virtual unsigned int | pendingConnectionsAborted () |
| Return a count of aborted or failed connection attempts. | |
| virtual DtAddressPortList | connections () const |
| Get the list of all current connections to this port. | |
| virtual void | listenToMulticastGroup (const MAKRti::DtInetAddr &mcastAddr) |
| Listen / drop multicast groups (not implemented in this class) | |
| virtual void | dropMulticastGroup (const MAKRti::DtInetAddr &mcastAddr) |
| virtual bool | updateFederateConnectionId (unsigned long orig, unsigned long final) |
| Update locally connected federate connection ID (LAN-port-only) | |
| virtual bool | flush () |
| Flush any pending messages. | |
| virtual bool | flushOnly () |
| Flush any pending messages. Does not do any socket disconnect processing. | |
| virtual MAKRti::DtString | connectionListToString (const char *separator=" : ") const |
| Print the current connection list. | |
| virtual bool | populateConnectionInformation (unsigned int &numForwarderToForwarderConns, std::vector< MAKRti::DtString > &forwarderIdentifiers, std::vector< MAKRti::DtString > &forwarderConnectionHostNames, std::vector< DtInetAddrAndPort > &forwarderConnectionAddrs) const |
| virtual void | socketAdditionCb (DtTcpMsgSocket *sock) |
| virtual void | sendMacAddrMsg (DtTcpMsgSocket *sock) |
| Send a populated DtMacAddrMsg to the specified socket. | |
| virtual void | sendPortMsg (DtTcpMsgSocket *sock) |
| Send a message indicating our local socket port for the given socket. | |
| virtual void | socketEstablishedCb (DtTcpMsgSocket *sock) |
| virtual void | socketRemovalCb (DtTcpMsgSocket *sock) |
| virtual void | processForwarderNodeInfoMsg (const DtForwarderPort::DtAddressMsgPair &msg) |
| virtual void | processMacAddrMsg (const DtForwarderPort::DtAddressMsgPair &msg) |
| virtual void | processPortMsg (const DtForwarderPort::DtAddressMsgPair &msgPair) |
| Process a message indicating the listening port of the forwarder on the other end of a socket. | |
| void | sendForwarderNodeInfoMsg (DtTcpMsgSocket *sock) |
| void | sendForwarderNodeInfoMsg () |
Static Public Member Functions | |
| static DtForwarderPort * | create (const DtRIDParameters *params, const DtBoost::shared_ptr< DtRouteMap > routes, const MAKRti::DtInetAddr &host, int forwarderPort, const MAKRti::DtInetAddr &additionalForwarderToConnectTo) |
| Creates an instance of a DtInOutForwarderPort. | |
| static void | setCreatorFunction (DtForwarderPortCreatorFcn creator) |
| Call this function to set an alternate creator function With this function, users can replace this DtInOutForwarderPort with their own derived class. | |
| static void | socketAdditionCb (DtTcpMsgSocket *sock, void *usr) |
| Callback for new connections. | |
| static void | socketEstablishedCb (DtTcpMsgSocket *sock, void *usr) |
| Callback for established connections. | |
| static void | socketRemovalCb (DtTcpMsgSocket *sock, void *usr) |
| Callback for dropped connections. | |
Protected Member Functions | |
| DtInOutForwarderPort (const DtRIDParameters *params, DtBoost::shared_ptr< DtRouteMap > routes, const MAKRti::DtInetAddr &host, int forwarderPort, const MAKRti::DtInetAddr &forwarderAddrToConnectTo) | |
| Base Ctor - called by default creator. | |
| virtual void | initializeConnections () |
| Initiates a connection to each adjacent node. | |
| virtual bool | connectToPeer (const DtInetAddrAndPort &addrToConnectTo) |
| Returns whether sock was ok() | |
| virtual int | processLostConnection (DtTcpMsgSocket *sock) |
| Handle lost connections. | |
| void | connectionCompleted (const DtInetAddrAndPort &addrAndPort, DtTcpMsgSocket *sock) |
| The new socket has been processed (either via routes files or dynamically). | |
| void | addSocketUsingRoutesFile (DtTcpMsgSocket *sock, const DtInetAddrAndPort &addrAndPort) |
| Add this socket to connection using routes file information. | |
| bool | addSocketDynamically (DtTcpMsgSocket *sock) |
| Add socket to connections dynamically. | |
| void | addConnection (const DtInetAddrAndPort &newConn, DtTcpMsgSocket *sock) |
| void | removeConnection (DtAddrToConnMap::iterator pos) |
| DtInOutForwarderPort () | |
| Default Ctor, Copy Ctor, Assignment - unimplemented. | |
| DtInOutForwarderPort (const DtInOutForwarderPort &orig) | |
| DtInOutForwarderPort & | operator= (const DtInOutForwarderPort &orig) |
| bool | removeFromPendingList (DtTcpMsgSocket *addr) |
| Remove a connection from the pending list (return true if found and removed) | |
| void | becomeRootForwarderNode () |
| Sets this forwarder node as the root. | |
Protected Attributes | |
| bool | myIsReady |
| DtPeerToPeerTcpSockMgr * | myConnectionMgr |
| DtForwarderPort::DtAddrToConnMap | myConnections |
| DtForwarderPort::DtAddrToConnMap::const_iterator | myNextConnection |
| DtForwarderPort::DtAddrToConnMap::const_iterator | myLastConnection |
| std::map< DtInetAddrAndPort, DtTcpMsgSocket * > | myAddrToSockMap |
| DtForwarderPort::DtSocketSet | myPendingConnections |
| Connections which are in process. | |
| DtForwarderPort::DtSocketSet | myPrePendingConnections |
| DtForwarderPort::DtSocketSet | myPostPendingConnections |
| DtForwarderPort::DtSocketSet | myUnknownPortConnections |
| std::map< DtInetAddrAndPort, DtString > | myNeededConnections |
| Connections needed before the forwarding network is complete. | |
| std::map< DtInetAddrAndPort, DtString > | myStillNeededConnections |
| Connections still needed before the forwarding network is complete. | |
| std::map< DtInetAddrAndPort, DtInetAddrAndPort > | myUsedToListeningMap |
| Map of actual address/port pairs to listening address/port pairs, which are also used for identification. | |
| DtForwarderPort::DtSocketList | myInitiatedConnections |
| DtForwarderPort::DtSocketSet | myExpiredConnections |
| DtForwarderPort::DtSocketSet | myDiscardedRemoteSockets |
| DtUdpMsgSocket * | myLegacyUdpConnection |
| std::map< DtInetAddrAndPort, unsigned long long > | myMacAddrsOfConnectedForwardersMap |
| bool | myIsRootForwarderNode |
| MAKRti::DtClock | myClock |
| std::map< DtTcpMsgSocket *, MAKRti::DtTime > | mySktSendTimeMap |
| MAKRti::DtInetDevice | myHostIf |
| The interface used for connections with other forwarders. | |
| int | myCompressionLevel |
Static Protected Attributes | |
| static DtForwarderPortCreatorFcn | theCreator = 0 |
The DtForwarderPort is an Abstract Base Class which provides the interface to a collection of connections from which messages may be read and to which messages may be sent.
| DtInOutForwarderPort::DtInOutForwarderPort | ( | const DtRIDParameters * | params, |
| DtBoost::shared_ptr< DtRouteMap > | routes, | ||
| const MAKRti::DtInetAddr & | host, | ||
| int | forwarderPort, | ||
| const MAKRti::DtInetAddr & | forwarderAddrToConnectTo | ||
| ) | [protected] |
Base Ctor - called by default creator.
References DtTcpMsgSocketMgr::addSocketAdditionCallback(), DtPeerToPeerTcpSockMgr::addSocketEstablishedCallback(), DtTcpMsgSocketMgr::addSocketRemovalCallback(), DtRIDParameters::distributedForwarderPort, DtDefaultInterfaceAddr(), DtGetLocalHostName(), DtIsIpOfLocalInterface(), DtPerformDNSLookup(), initializeConnections(), DtTcpMsgSocketMgr::isListening(), DtRIDParameters::maxForwarderQueue, myClock, myConnectionMgr, myHostIf, DtForwarderPort::myOk, DtForwarderPort::myPortToUse, DtForwarderPort::myRoutes, DtRIDParameters::networkInterfaceAddr(), DtTcpMsgSocketMgr::openServerSocket(), DtRtiForwarderGroup::setConnectionManager(), DtTcpMsgSocketMgr::setRecvBufferSize(), DtTcpMsgSocketMgr::setSendBufferSize(), socketAdditionCb(), socketEstablishedCb(), DtRIDParameters::socketReceiveBufferSize, socketRemovalCb(), and DtRIDParameters::socketSendBufferSize.
| DtInOutForwarderPort::~DtInOutForwarderPort | ( | ) | [virtual] |
| DtInOutForwarderPort::DtInOutForwarderPort | ( | ) | [protected] |
Default Ctor, Copy Ctor, Assignment - unimplemented.
Referenced by create().
| DtInOutForwarderPort::DtInOutForwarderPort | ( | const DtInOutForwarderPort & | orig | ) | [protected] |
| unsigned int DtInOutForwarderPort::abortPendingConnections | ( | ) | [virtual] |
Abort any embryonic connections.
Implements DtForwarderPort.
References DtPeerToPeerTcpSockMgr::abortPendingConnections(), and myConnectionMgr.
| void DtInOutForwarderPort::addConnection | ( | const DtInetAddrAndPort & | newConn, |
| DtTcpMsgSocket * | sock | ||
| ) | [protected] |
References DtTcpMsgSocket::destination(), myConnections, myLastConnection, myNextConnection, and myUsedToListeningMap.
Referenced by connectionCompleted().
| bool DtInOutForwarderPort::addSocketDynamically | ( | DtTcpMsgSocket * | sock | ) | [protected] |
Add socket to connections dynamically.
Returns whether the socket was added to the routes map.
References DtTcpMsgSocket::destination(), and DtForwarderPort::myRoutes.
Referenced by socketAdditionCb(), and socketEstablishedCb().
| void DtInOutForwarderPort::addSocketUsingRoutesFile | ( | DtTcpMsgSocket * | sock, |
| const DtInetAddrAndPort & | addrAndPort | ||
| ) | [protected] |
Add this socket to connection using routes file information.
References connectionCompleted(), DtPeerToPeerTcpSockMgr::connectToPeer(), DtTcpMsgSocket::isConnected(), DtTcpMsgSocket::isConnectionInProgress(), DtForwarderPort::myAddress, myConnectionMgr, myConnections, myDiscardedRemoteSockets, myExpiredConnections, myHostIf, myInitiatedConnections, myPendingConnections, DtForwarderPort::myPortToUse, DtForwarderPort::myRoutes, myStillNeededConnections, and DtPeerToPeerTcpSockMgr::removeAndDeletePeerConnection().
Referenced by processPortMsg(), and socketEstablishedCb().
| void DtInOutForwarderPort::becomeRootForwarderNode | ( | ) | [protected] |
Sets this forwarder node as the root.
References myIsRootForwarderNode.
Referenced by initializeConnections(), and socketRemovalCb().
| int DtInOutForwarderPort::checkConnectionStatus | ( | const DtInetAddrAndPort * | target = 0 | ) | [virtual] |
Test for lost connections - returns true if targeted connection is active or if no target specified returns false if at least one drop detected.
Implements DtForwarderPort.
References DtForwarderPort::connectionLost(), DtTcpMsgSocket::isConnected(), myClock, myConnectionMgr, myConnections, DtForwarderPort::myRoutes, mySktSendTimeMap, DtPeerToPeerTcpSockMgr::processConnections(), processInitializationMessages(), processLostConnection(), and DtTcpMsgSocket::testConnectionStatus().
| void DtInOutForwarderPort::clearNeededConnections | ( | ) | [virtual] |
Clear the list of needed forwarder connections.
Implements DtForwarderPort.
References myNeededConnections, and myStillNeededConnections.
| void DtInOutForwarderPort::connectionCompleted | ( | const DtInetAddrAndPort & | addrAndPort, |
| DtTcpMsgSocket * | sock | ||
| ) | [protected] |
The new socket has been processed (either via routes files or dynamically).
Record established connection.
References addConnection(), DtForwarderPort::connectionEstablished(), connectionListToString(), DtTcpMsgSocket::enableBundling(), DtTcpMsgSocket::enableCompression(), myClock, DtForwarderPort::myRoutes, mySktSendTimeMap, removeFromPendingList(), and sendForwarderNodeInfoMsg().
Referenced by addSocketUsingRoutesFile(), and processForwarderNodeInfoMsg().
| MAKRti::DtString DtInOutForwarderPort::connectionListToString | ( | const char * | separator = " : " | ) | const [virtual] |
Print the current connection list.
References DtForwarderPort::myAddress, and myConnections.
Referenced by connectionCompleted(), and socketRemovalCb().
| DtForwarderPort::DtAddressPortList DtInOutForwarderPort::connections | ( | ) | const [virtual] |
Get the list of all current connections to this port.
Implements DtForwarderPort.
References myConnections.
| bool DtInOutForwarderPort::connectToPeer | ( | const DtInetAddrAndPort & | addrToConnectTo | ) | [protected, virtual] |
Returns whether sock was ok()
References DtPeerToPeerTcpSockMgr::connectToPeer(), DtTcpMsgSocket::isConnected(), DtTcpMsgSocket::isConnectionInProgress(), myAddrToSockMap, myConnectionMgr, myHostIf, myInitiatedConnections, myPendingConnections, myPrePendingConnections, and DtForwarderPort::myRoutes.
Referenced by initializeConnections(), and processForwarderNodeInfoMsg().
| DtForwarderPort * DtInOutForwarderPort::create | ( | const DtRIDParameters * | params, |
| const DtBoost::shared_ptr< DtRouteMap > | routes, | ||
| const MAKRti::DtInetAddr & | host, | ||
| int | forwarderPort, | ||
| const MAKRti::DtInetAddr & | additionalForwarderToConnectTo | ||
| ) | [static] |
Creates an instance of a DtInOutForwarderPort.
References DtInOutForwarderPort(), and theCreator.
Referenced by setCreatorFunction().
| virtual void DtInOutForwarderPort::dropMulticastGroup | ( | const MAKRti::DtInetAddr & | mcastAddr | ) | [inline, virtual] |
Implements DtForwarderPort.
| bool DtInOutForwarderPort::flush | ( | ) | [virtual] |
Flush any pending messages.
Reimplemented from DtForwarderPort.
References flushOnly(), myConnectionMgr, myDiscardedRemoteSockets, myExpiredConnections, and DtTcpMsgSocketMgr::removeAndDelete().
| bool DtInOutForwarderPort::flushOnly | ( | ) | [virtual] |
Flush any pending messages. Does not do any socket disconnect processing.
References myConnections.
Referenced by flush(), and socketRemovalCb().
| bool DtInOutForwarderPort::getInitializationMsg | ( | DtMsgSocket * | sock, |
| DtAddressMsgPair & | msg, | ||
| bool | printBeDestMetadata | ||
| ) | [virtual] |
Get the next initialization message off of a pending TCP socket.
References DtRtiMtdMcastAddr::get(), DtRtiMsg::kindString(), DtForwarderPort::myParams, and DtMsgSocket::recvMessageWithSrc().
Referenced by getInitializationMsgs(), and processInitializationMessages().
| bool DtInOutForwarderPort::getInitializationMsgs | ( | DtForwarderPort::DtSocketSet & | socks, |
| std::list< DtAddressMsgPair > & | msgs, | ||
| bool | printBeDestMetadata | ||
| ) | [virtual] |
Get the next initialization messages off of a set of pending TCP sockets.
References getInitializationMsg().
Referenced by processInitializationMessages().
Get the next message to forward and the source connection.
Implements DtForwarderPort.
References DtRtiMtdTransportType::get(), DtRtiMtdMcastAddr::get(), DtTcpMsgSocket::isConnected(), DtRtiMsg::kindString(), myConnectionMgr, myConnections, myLastConnection, myLegacyUdpConnection, myNextConnection, DtForwarderPort::myParams, DtPeerToPeerTcpSockMgr::processConnections(), processInitializationMessages(), DtUdpMsgSocket::recvMessage(), and DtTcpMsgSocket::recvMessage().
| void DtInOutForwarderPort::initializeConnections | ( | ) | [protected, virtual] |
Initiates a connection to each adjacent node.
References becomeRootForwarderNode(), connectToPeer(), DtIsIpOfLocalInterface(), DtUdpMsgSocket::enableBundling(), DtUdpMsgSocket::enableCompression(), DtRIDParameters::enablePacketBundling, DtUdpMsgSocket::isOpen(), DtRIDParameters::isUdpCompressionEnabled, DtRIDParameters::maxUdpPacketSize, myLegacyUdpConnection, myNeededConnections, DtForwarderPort::myParams, DtForwarderPort::myRoutes, myStillNeededConnections, DtUdpMsgSocket::openSocket(), DtRIDParameters::packetBundlingSize, sendForwarderNodeInfoMsg(), DtMsgSocket::setRecvBufferSize(), DtRIDParameters::socketReceiveBufferSize, and DtRIDParameters::udpCompressionLevel.
Referenced by DtInOutForwarderPort().
| bool DtInOutForwarderPort::isReady | ( | ) | const [virtual] |
| virtual void DtInOutForwarderPort::listenToMulticastGroup | ( | const MAKRti::DtInetAddr & | mcastAddr | ) | [inline, virtual] |
Listen / drop multicast groups (not implemented in this class)
Implements DtForwarderPort.
| DtInOutForwarderPort& DtInOutForwarderPort::operator= | ( | const DtInOutForwarderPort & | orig | ) | [protected] |
| unsigned int DtInOutForwarderPort::pendingConnectionsAborted | ( | ) | [virtual] |
Return a count of aborted or failed connection attempts.
Implements DtForwarderPort.
References myConnectionMgr, and DtPeerToPeerTcpSockMgr::pendingConnectionsAborted().
| bool DtInOutForwarderPort::populateConnectionInformation | ( | unsigned int & | numForwarderToForwarderConns, |
| std::vector< MAKRti::DtString > & | forwarderIdentifiers, | ||
| std::vector< MAKRti::DtString > & | forwarderConnectionHostNames, | ||
| std::vector< DtInetAddrAndPort > & | forwarderConnectionAddrs | ||
| ) | const [virtual] |
References DtForwarderPort::myAddress, myConnections, DtForwarderPort::myPortToUse, and DtForwarderPort::myRoutes.
Referenced by DtForwarderNode::connectionInformation().
| void DtInOutForwarderPort::processForwarderNodeInfoMsg | ( | const DtForwarderPort::DtAddressMsgPair & | msg | ) | [virtual] |
References connectionCompleted(), connectToPeer(), DtIsIpOfLocalInterface(), DtForwarderNodeInfoMsg::forwarderHostName(), DtForwarderNodeInfoMsg::forwarderName(), DtForwarderNodeInfoMsg::getInetAddr(), DtForwarderNodeInfoMsg::getNodeId(), DtForwarderNodeInfoMsg::getPort(), DtForwarderNodeInfoMsg::knownForwarderNodes(), myAddrToSockMap, myConnections, myIsRootForwarderNode, myPostPendingConnections, DtForwarderPort::myRoutes, DtForwarderNodeInfoMsg::nodeIdForRecipientToUse(), sendForwarderNodeInfoMsg(), and updateRoutes().
Referenced by processInitializationMessages().
| void DtInOutForwarderPort::processInitializationMessages | ( | ) | [virtual] |
References DtForwarderNodeInfoMsgKind, DtForwarderPortMsgKind, DtMacAddrMsgKind, getInitializationMsg(), getInitializationMsgs(), myConnectionMgr, myLegacyUdpConnection, myPendingConnections, myPostPendingConnections, DtForwarderPort::myRoutes, myUnknownPortConnections, DtPeerToPeerTcpSockMgr::processConnections(), processForwarderNodeInfoMsg(), processMacAddrMsg(), and processPortMsg().
Referenced by checkConnectionStatus(), getNextMsg(), and updateRoutes().
| int DtInOutForwarderPort::processLostConnection | ( | DtTcpMsgSocket * | sock | ) | [protected, virtual] |
Handle lost connections.
References myConnectionMgr, and DtTcpMsgSocketMgr::removeAndDelete().
Referenced by checkConnectionStatus(), sendForwarderNodeInfoMsg(), sendToAllReliable(), and sendToListReliable().
| void DtInOutForwarderPort::processMacAddrMsg | ( | const DtForwarderPort::DtAddressMsgPair & | msg | ) | [virtual] |
References DtFirstHostMACAddr(), DtMacAddrMsg::macAddr(), myExpiredConnections, myInitiatedConnections, myMacAddrsOfConnectedForwardersMap, myPendingConnections, myPostPendingConnections, removeFromPendingList(), DtMacAddrMsg::senderConnecting(), and sendForwarderNodeInfoMsg().
Referenced by processInitializationMessages().
| void DtInOutForwarderPort::processPortMsg | ( | const DtForwarderPort::DtAddressMsgPair & | msgPair | ) | [virtual] |
Process a message indicating the listening port of the forwarder on the other end of a socket.
References DtForwarderPortMsg::address(), addSocketUsingRoutesFile(), DtForwarderPortMsg::connectedPort(), DtTcpMsgSocket::destination(), DtForwarderPortMsg::listeningPort(), myAddrToSockMap, DtForwarderPort::myRoutes, myUnknownPortConnections, and myUsedToListeningMap.
Referenced by processInitializationMessages().
| void DtInOutForwarderPort::removeConnection | ( | DtAddrToConnMap::iterator | pos | ) | [protected] |
References myConnections, myLastConnection, and myNextConnection.
Referenced by socketRemovalCb().
| bool DtInOutForwarderPort::removeFromPendingList | ( | DtTcpMsgSocket * | addr | ) | [protected] |
Remove a connection from the pending list (return true if found and removed)
References myPendingConnections, myPostPendingConnections, myPrePendingConnections, and myUnknownPortConnections.
Referenced by connectionCompleted(), processMacAddrMsg(), and socketRemovalCb().
| void DtInOutForwarderPort::selectParams | ( | MAKRti::DtSelectParamWithWrite & | selectParams | ) | [virtual] |
Add this port's current select() notification set to the passed set.
Implements DtForwarderPort.
References myConnections.
| void DtInOutForwarderPort::sendByTransport | ( | const DtForwarderMsg & | msg | ) | const [virtual] |
Check transport metadata and send message to appropriate destinations.
Implements DtForwarderPort.
| void DtInOutForwarderPort::sendForwarderNodeInfoMsg | ( | DtTcpMsgSocket * | sock | ) |
References DtTcpMsgSocket::destination(), DtGetLocalHostName(), DtTcpMsgSocket::flush(), DtTcpMsgSocket::isConnected(), DtForwarderPort::myAddress, DtForwarderNodeInfo::myIpAddr, myIsRootForwarderNode, DtForwarderPort::myPortToUse, DtForwarderPort::myRoutes, processLostConnection(), DtTcpMsgSocket::sendMessage(), DtForwarderNodeInfoMsg::setForwarderHostName(), DtForwarderNodeInfoMsg::setForwarderName(), DtForwarderNodeInfoMsg::setInetAddr(), DtForwarderNodeInfoMsg::setKnownForwarderNodes(), DtForwarderNodeInfoMsg::setNodeId(), DtForwarderNodeInfoMsg::setNodeIdForRecipientToUse(), and DtForwarderNodeInfoMsg::setPort().
References myConnections, and myPostPendingConnections.
Referenced by connectionCompleted(), initializeConnections(), processForwarderNodeInfoMsg(), processMacAddrMsg(), socketAdditionCb(), and socketRemovalCb().
| void DtInOutForwarderPort::sendMacAddrMsg | ( | DtTcpMsgSocket * | sock | ) | [virtual] |
Send a populated DtMacAddrMsg to the specified socket.
References DtTcpMsgSocket::destination(), DtFirstHostMACAddr(), DtTcpMsgSocket::flush(), myAddrToSockMap, myIsReady, DtForwarderPort::myRoutes, DtTcpMsgSocket::sendMessage(), DtMacAddrMsg::setMacAddr(), and DtMacAddrMsg::setSenderConnecting().
Referenced by socketAdditionCb().
| void DtInOutForwarderPort::sendPortMsg | ( | DtTcpMsgSocket * | sock | ) | [virtual] |
Send a message indicating our local socket port for the given socket.
References DtTcpMsgSocket::flush(), DtMsgSocket::localEndpoint(), DtForwarderPort::myRoutes, DtTcpMsgSocket::sendMessage(), DtForwarderPortMsg::setAddress(), DtForwarderPortMsg::setConnectedPort(), and DtForwarderPortMsg::setListeningPort().
Referenced by socketAdditionCb(), and socketEstablishedCb().
| void DtInOutForwarderPort::sendToAllReliable | ( | const DtForwarderMsg & | msg | ) | const [virtual] |
Send a message to all available destinations.
Implements DtForwarderPort.
References DtTcpMsgSocket::bundleSize(), DtTcpMsgSocket::flush(), DtTcpMsgSocket::isConnected(), DtRtiMsg::kindString(), DtForwarderPort::DtForwarderMsg::length, DtForwarderPort::DtForwarderMsg::msg, myClock, myConnections, mySktSendTimeMap, processLostConnection(), and DtTcpMsgSocket::sendMessage().
| void DtInOutForwarderPort::sendToListReliable | ( | const DtForwarderMsg & | msg, |
| const DtAddressPortList & | destinations | ||
| ) | const [virtual] |
Send a message to the specified list of destinations excluding the list of filtered destinations.
Implements DtForwarderPort.
References DtTcpMsgSocket::bundleSize(), DtTcpMsgSocket::flush(), DtTcpMsgSocket::isConnected(), DtRtiMsg::kindString(), DtForwarderPort::DtForwarderMsg::length, DtForwarderPort::DtForwarderMsg::msg, myClock, myConnections, mySktSendTimeMap, processLostConnection(), and DtTcpMsgSocket::sendMessage().
| void DtInOutForwarderPort::setCreatorFunction | ( | DtForwarderPortCreatorFcn | creator | ) | [static] |
Call this function to set an alternate creator function With this function, users can replace this DtInOutForwarderPort with their own derived class.
References create(), DtBindCreator(), and theCreator.
| void DtInOutForwarderPort::socketAdditionCb | ( | DtTcpMsgSocket * | sock, |
| void * | usr | ||
| ) | [static] |
Callback for new connections.
Referenced by DtInOutForwarderPort(), and ~DtInOutForwarderPort().
| void DtInOutForwarderPort::socketAdditionCb | ( | DtTcpMsgSocket * | sock | ) | [virtual] |
References addSocketDynamically(), DtTcpMsgSocket::destination(), DtTcpMsgSocket::isConnected(), myAddrToSockMap, myConnectionMgr, myExpiredConnections, myInitiatedConnections, myPostPendingConnections, myPrePendingConnections, DtForwarderPort::myRoutes, myUnknownPortConnections, DtPeerToPeerTcpSockMgr::removeAndDeletePeerConnection(), sendForwarderNodeInfoMsg(), sendMacAddrMsg(), sendPortMsg(), and DtTcpMsgSocket::testConnectionStatus().
| void DtInOutForwarderPort::socketEstablishedCb | ( | DtTcpMsgSocket * | sock, |
| void * | usr | ||
| ) | [static] |
Callback for established connections.
Referenced by DtInOutForwarderPort(), and ~DtInOutForwarderPort().
| void DtInOutForwarderPort::socketEstablishedCb | ( | DtTcpMsgSocket * | sock | ) | [virtual] |
References addSocketDynamically(), addSocketUsingRoutesFile(), DtTcpMsgSocket::destination(), myAddrToSockMap, myConnectionMgr, myExpiredConnections, myInitiatedConnections, myPendingConnections, myPrePendingConnections, DtForwarderPort::myRoutes, DtPeerToPeerTcpSockMgr::removeAndDeletePeerConnection(), and sendPortMsg().
| void DtInOutForwarderPort::socketRemovalCb | ( | DtTcpMsgSocket * | sock, |
| void * | usr | ||
| ) | [static] |
Callback for dropped connections.
Referenced by DtInOutForwarderPort(), and ~DtInOutForwarderPort().
| void DtInOutForwarderPort::socketRemovalCb | ( | DtTcpMsgSocket * | sock | ) | [virtual] |
References becomeRootForwarderNode(), connectionListToString(), DtForwarderPort::connectionLost(), DtTcpMsgSocket::destination(), flushOnly(), DtForwarderPort::myAdditionalAddrToConnectTo, myAddrToSockMap, myConnections, myDiscardedRemoteSockets, myExpiredConnections, myInitiatedConnections, myIsReady, myIsRootForwarderNode, myPendingConnections, myPostPendingConnections, myPrePendingConnections, DtForwarderPort::myRoutes, myUsedToListeningMap, removeConnection(), removeFromPendingList(), and sendForwarderNodeInfoMsg().
| bool DtInOutForwarderPort::updateFederateConnectionId | ( | unsigned long | orig, |
| unsigned long | final | ||
| ) | [inline, virtual] |
Update locally connected federate connection ID (LAN-port-only)
Implements DtForwarderPort.
| void DtInOutForwarderPort::updateRoutes | ( | ) | [virtual] |
Handle changes to the Routing map.
Implements DtForwarderPort.
References DtForwarderPort::forwarderNodeIsReady(), myConnectionMgr, myIsReady, myIsRootForwarderNode, myNeededConnections, myPendingConnections, myPostPendingConnections, myPrePendingConnections, DtForwarderPort::myRoutes, myStillNeededConnections, DtForwarderPort::notWaitingForForwarderConnections(), DtPeerToPeerTcpSockMgr::processConnections(), processInitializationMessages(), and DtForwarderPort::waitingForForwarderConnections().
Referenced by processForwarderNodeInfoMsg().
std::map<DtInetAddrAndPort, DtTcpMsgSocket*> DtInOutForwarderPort::myAddrToSockMap [protected] |
MAKRti::DtClock DtInOutForwarderPort::myClock [protected] |
Referenced by checkConnectionStatus(), connectionCompleted(), DtInOutForwarderPort(), sendToAllReliable(), and sendToListReliable().
int DtInOutForwarderPort::myCompressionLevel [protected] |
Referenced by abortPendingConnections(), addSocketUsingRoutesFile(), checkConnectionStatus(), connectToPeer(), DtInOutForwarderPort(), flush(), getNextMsg(), pendingConnectionsAborted(), processInitializationMessages(), processLostConnection(), socketAdditionCb(), socketEstablishedCb(), updateRoutes(), and ~DtInOutForwarderPort().
Referenced by addConnection(), addSocketUsingRoutesFile(), checkConnectionStatus(), connectionListToString(), connections(), flushOnly(), getNextMsg(), populateConnectionInformation(), processForwarderNodeInfoMsg(), removeConnection(), selectParams(), sendForwarderNodeInfoMsg(), sendToAllReliable(), sendToListReliable(), socketRemovalCb(), and ~DtInOutForwarderPort().
Referenced by addSocketUsingRoutesFile(), flush(), and socketRemovalCb().
Referenced by addSocketUsingRoutesFile(), flush(), processMacAddrMsg(), socketAdditionCb(), socketEstablishedCb(), and socketRemovalCb().
MAKRti::DtInetDevice DtInOutForwarderPort::myHostIf [protected] |
The interface used for connections with other forwarders.
Referenced by addSocketUsingRoutesFile(), connectToPeer(), and DtInOutForwarderPort().
Referenced by addSocketUsingRoutesFile(), connectToPeer(), processMacAddrMsg(), socketAdditionCb(), socketEstablishedCb(), and socketRemovalCb().
bool DtInOutForwarderPort::myIsReady [protected] |
Referenced by isReady(), sendMacAddrMsg(), socketRemovalCb(), and updateRoutes().
bool DtInOutForwarderPort::myIsRootForwarderNode [protected] |
DtForwarderPort::DtAddrToConnMap::const_iterator DtInOutForwarderPort::myLastConnection [protected] |
Referenced by addConnection(), getNextMsg(), and removeConnection().
Referenced by getNextMsg(), initializeConnections(), and processInitializationMessages().
std::map<DtInetAddrAndPort, unsigned long long> DtInOutForwarderPort::myMacAddrsOfConnectedForwardersMap [protected] |
Referenced by processMacAddrMsg().
std::map<DtInetAddrAndPort, DtString> DtInOutForwarderPort::myNeededConnections [protected] |
Connections needed before the forwarding network is complete.
Referenced by clearNeededConnections(), initializeConnections(), and updateRoutes().
DtForwarderPort::DtAddrToConnMap::const_iterator DtInOutForwarderPort::myNextConnection [protected] |
Referenced by addConnection(), getNextMsg(), and removeConnection().
Connections which are in process.
Referenced by addSocketUsingRoutesFile(), connectToPeer(), processInitializationMessages(), processMacAddrMsg(), removeFromPendingList(), socketEstablishedCb(), socketRemovalCb(), and updateRoutes().
Referenced by connectToPeer(), removeFromPendingList(), socketAdditionCb(), socketEstablishedCb(), socketRemovalCb(), and updateRoutes().
std::map< DtTcpMsgSocket*, MAKRti::DtTime > DtInOutForwarderPort::mySktSendTimeMap [mutable, protected] |
Referenced by checkConnectionStatus(), connectionCompleted(), sendToAllReliable(), and sendToListReliable().
std::map<DtInetAddrAndPort, DtString> DtInOutForwarderPort::myStillNeededConnections [protected] |
Connections still needed before the forwarding network is complete.
Referenced by addSocketUsingRoutesFile(), clearNeededConnections(), initializeConnections(), and updateRoutes().
Referenced by processInitializationMessages(), processPortMsg(), removeFromPendingList(), and socketAdditionCb().
std::map<DtInetAddrAndPort, DtInetAddrAndPort> DtInOutForwarderPort::myUsedToListeningMap [protected] |
Map of actual address/port pairs to listening address/port pairs, which are also used for identification.
Referenced by addConnection(), processPortMsg(), and socketRemovalCb().
DtInOutForwarderPort::DtForwarderPortCreatorFcn DtInOutForwarderPort::theCreator = 0 [static, protected] |
Referenced by create(), and setCreatorFunction().