11 #ifndef DtInOutForwarderPort_H_
12 #define DtInOutForwarderPort_H_
18 #include <vlutil/vlTime.h>
24 class DtTcpSocketMgr__vl__;
40 std::shared_ptr<DtRouteMap> routes,
41 const MAKRti::DtInetAddr& host,
43 const MAKRti::DtInetEndpoint& forwarderAddrToConnectTo );
57 std::list<DtAddressMsgPair>& msgs,
bool printBeDestMetadata);
60 virtual bool getInitializationMsg(
DtMsgSocket* sock,
75 virtual void selectParams( MAKRti::DtSelectParamWithWrite& selectParams );
81 virtual void processInitializationMessages();
115 virtual bool flush();
118 virtual bool flushOnly();
121 virtual MAKRti::DtString connectionListToString(
const char* separator =
" : ")
const;
123 virtual bool populateConnectionInformation(
124 unsigned int& numForwarderToForwarderConns,
125 std::vector<MAKRti::DtString>& forwarderIdentifiers,
126 std::vector<MAKRti::DtString>& forwarderConnectionHostNames,
127 std::vector<DtInetAddrAndPort>& forwarderConnectionAddrs)
const;
130 virtual bool addPeerConnection(
const MAKRti::DtString& host,
131 const MAKRti::DtInetAddr& ipAddress,
int port,
bool distributeConnection);
150 const std::shared_ptr<DtRouteMap> routes,
151 const MAKRti::DtInetAddr& host,
int forwarderPort,
152 const MAKRti::DtInetEndpoint& additionalForwarderToConnectTo );
157 static void setCreatorFunction( DtForwarderPortCreatorFcn creator );
169 static void socketEstablishedCb(
DtTcpMsgSocket* sock,
void* usr );
180 virtual void initializeConnections();
189 virtual void sendForwarderNodeInfoMsgToConnections();
193 virtual void sendForwarderNodeInfoMsg(
DtTcpMsgSocket* sock,
unsigned long nodeIdToUse=0);
197 const MAKRti::DtString& fwName,
const MAKRti::DtString& fwHostName);
214 virtual void connectionCompleted(
const MAKRti::DtString& nodeName,
const MAKRti::DtString& hostName,
unsigned long nodeId,
230 virtual void removeConnection( DtAddrToConnMap::iterator pos );
240 virtual void becomeRootForwarderNode();
244 const MAKRti::DtString& fwName,
const MAKRti::DtString& fwHostName,
const std::set<DtForwarderNodeInfo>& fwConnPeers);
319 unsigned long final )
std::set< DtTcpMsgSocket * > DtSocketSet
Definition: forwarderPort.h:58
The DtForwarderPort is an Abstract Base Class which provides the interface to a collection of connect...
Definition: inOutForwarderPort.h:33
DtForwarderPort::DtSocketSet myPostPendingConnections
Definition: inOutForwarderPort.h:274
std::pair< MAKRti::DtInetAddr, int > DtInetAddrAndPort
Definition: rtiUtil.h:148
The DtMacAddrMsg defines a msg used by forwarders to connect.
Definition: macAddrMsg.h:32
virtual DtAddressPortList connections() const =0
Get the list of all current connections to this port.
DtForwarderPort::DtSocketSet myDynamicallyReceivedConnections
Definition: inOutForwarderPort.h:277
bool myIsRootForwarderNode
Definition: inOutForwarderPort.h:297
The DtForwarderPort is an Abstract Base Class which provides the interface to a collection of connect...
Definition: forwarderPort.h:38
This class manages the RTI's start-up configuration using both MTL variables and functions.
Definition: RIDparams.h:87
std::map< DtInetAddrAndPort, DtInetAddrAndPort > myListeningToUsedMap
Definition: inOutForwarderPort.h:288
DtForwarderPort::DtSocketSet myExpiredConnections
Definition: inOutForwarderPort.h:292
DtInetAddrAndPort myPendingPeerAddition
Definition: inOutForwarderPort.h:262
The DtPeerToPeerTcpSockMgr adds the ability to act as a client as well as a server to the DtTcpMsgSoc...
Definition: peerToPeerSockMgr.h:45
std::map< DtInetAddrAndPort, MAKRti::DtString > myStillNeededConnections
Connections still needed before the forwarding network is complete.
Definition: inOutForwarderPort.h:283
virtual void listenToMulticastGroup(const MAKRti::DtInetAddr &mcastAddr)
Listen / drop multicast groups (not implemented in this class)
Definition: inOutForwarderPort.h:107
DtUdpMsgSocket * myLegacyUdpConnection
Definition: inOutForwarderPort.h:295
DtForwarderPort::DtSocketList myInitiatedConnections
Definition: inOutForwarderPort.h:291
virtual void updateRoutes()=0
Handle changes to the Routing map.
std::map< DtTcpMsgSocket *, unsigned long > mySockToIdMap
Definition: inOutForwarderPort.h:269
This file contains the declaration of the DtUdpMsgSocket base class.
MAKRti::DtInetDevice myHostIf
The interface used for connections with other forwarders.
Definition: inOutForwarderPort.h:304
int myCompressionLevel
Definition: inOutForwarderPort.h:306
static DtForwarderPortCreatorFcn theCreator
Definition: inOutForwarderPort.h:314
Definition: forwarderPort.h:47
std::map< DtInetAddrAndPort, unsigned long long > myMacAddrsOfConnectedForwardersMap
Definition: inOutForwarderPort.h:296
MAKRti::DtClock myClock
Definition: inOutForwarderPort.h:299
virtual void clearNeededConnections()=0
Clear the list of connections that this forwarder needs to establish.
MAKRti::DtString myHostname
Definition: inOutForwarderPort.h:308
std::map< DtInetAddrAndPort, DtInetAddrAndPort > myUsedToListeningMap
Map of actual address/port pairs to listening address/port pairs, which are also used for identificat...
Definition: inOutForwarderPort.h:287
This file contains the declaration of the DtPeerToPeerTcpSockMgr class.
std::pair< DtInetAddrAndPort, DtForwarderMsg > DtAddressMsgPair
Definition: forwarderPort.h:59
DtForwarderPort::DtAddrToConnMap::const_iterator myNextConnection
Definition: inOutForwarderPort.h:259
std::map< DtInetAddrAndPort, DtTcpMsgSocket * > myAddrToSockMap
Definition: inOutForwarderPort.h:267
DtForwarderPort::DtSocketSet myPendingConnections
Connections which are in process.
Definition: inOutForwarderPort.h:272
DtRouteMap::DtAddressPortList DtAddressPortList
Definition: forwarderPort.h:54
virtual void sendToAllReliable(const DtForwarderMsg &msg) const =0
Send a message to all available destinations.
bool myIsReady
Definition: inOutForwarderPort.h:256
DtAddrToConnMap mySocketToBeRemoved
Duplicate connections to be deleted on processPortMsg.
Definition: inOutForwarderPort.h:265
Definition: forwarderNodeInfoMsg.h:28
virtual bool isReady() const =0
Is the Port fully usable and available?
DtForwarderPort::DtAddrToConnMap::const_iterator myLastConnection
Definition: inOutForwarderPort.h:260
Definition: routeMap.h:41
The DtTcpMsgSocket class provides an address family independent TCP socket that handles RTI messages...
Definition: tcpMsgSocket.h:40
virtual int checkConnectionStatus(const DtInetAddrAndPort *target=0)=0
Test for lost connections - returns true if targeted connection is active or, if no target specified...
DtForwarderPort::DtSocketSet myDiscardedRemoteSockets
Definition: inOutForwarderPort.h:293
std::vector< DtTcpMsgSocket * > DtSocketList
Definition: forwarderPort.h:57
DtForwarderPort::DtSocketSet myUnknownPortConnections
Definition: inOutForwarderPort.h:275
virtual unsigned int pendingConnectionsAborted()=0
Return count of aborted connections.
std::map< DtInetAddrAndPort, MAKRti::DtString > myNeededConnections
Connections needed before the forwarding network is complete.
Definition: inOutForwarderPort.h:280
std::map< DtTcpMsgSocket *, unsigned int > myTestCountFailureMap
Definition: inOutForwarderPort.h:302
virtual bool updateFederateConnectionId(unsigned long orig, unsigned long final)
Update locally connected federate connection ID (LAN-port-only)
Definition: inOutForwarderPort.h:318
virtual void sendToListReliable(const DtForwarderMsg &msg, const DtRouteMap::DtAddressPortList &destinations) const =0
Send a message to the specified list of destinations excluding the list of filtered destinations...
The DtMsgSocket provides a wrapper around the MAKRti::DtInetSocket class to operate on messages rathe...
Definition: msgSocket.h:28
virtual void selectParams(MAKRti::DtSelectParamWithWrite &selectParams)=0
Add this port's current select() notification set to the passed set.
DtForwarderPort::DtAddrToConnMap myConnections
Definition: inOutForwarderPort.h:258
unsigned long myMsgCount
Definition: inOutForwarderPort.h:310
DtForwarderPort::DtSocketSet myPrePendingConnections
Definition: inOutForwarderPort.h:273
virtual void sendByTransport(const DtForwarderMsg &msg) const =0
Check transport metadata and send message to appropriate socket(s)
The DtForwarderNodeInfoMsg defines a msg for a client to report the results of a latency test...
Definition: forwarderNodeInfoMsg.h:88
DtPeerToPeerTcpSockMgr * myConnectionMgr
Definition: inOutForwarderPort.h:257
std::map< DtInetAddrAndPort, DtTcpMsgSocket * > DtAddrToConnMap
Definition: forwarderPort.h:61
std::map< DtTcpMsgSocket *, MAKRti::DtTime > mySktSendTimeMap
Definition: inOutForwarderPort.h:300
virtual void dropMulticastGroup(const MAKRti::DtInetAddr &mcastAddr)
Listen / drop multicast groups (not implemented in this class)
Definition: inOutForwarderPort.h:108
#define DT_DLL_FORWARDER
Definition: rtiMsConfig.h:153
virtual bool updateFederateConnectionId(unsigned long orig, unsigned long final)=0
Update locally connected federate connection ID (LAN-port-only)
DtForwarderPort::DtSocketSet myDynamicallyInitiatedConnections
Definition: inOutForwarderPort.h:276
The DtUdpMsgSocket class provides an address family independent UDP socket that handles RTI messages...
Definition: udpMsgSocket.h:26
virtual bool flush()
Flush any unsent/buffered packets; return true if flush sent data.
Definition: forwarderPort.h:363
DtInetAddrAndPort myLocalDestination
Definition: inOutForwarderPort.h:261
virtual DtAddressMsgPair getNextMsg()=0
Get the next message to forward and the source connection.
virtual unsigned int abortPendingConnections()=0
Abort any embryonic connections.