19 #include <vlutil/vlInetUdpSocket.h>
54 virtual void openSocket(
const MAKRti::DtInetEndpoint& dest,
55 MAKRti::DtU32 flags = theDefaultSockOpts, MAKRti::DtU16 localPort = 0,
56 MAKRti::DtInetDevice* hostIf =
NULL);
59 virtual int sendMessage(caddr_t msg,
size_t msgSize,
bool deleteAfterSend,
60 const MAKRti::DtInetAddr& destAddr = MAKRti::DtInetAddr::inaddrAny(),
int port = 0);
90 virtual bool joinMulticastGroup(
const MAKRti::DtInetAddr& grpAddr,
91 MAKRti::DtInetDevice* device =
NULL );
92 virtual bool joinMulticastGroup(
const MAKRti::DtInetEndpoint& grpEndpoint,
93 MAKRti::DtInetDevice* device =
NULL );
94 virtual bool dropMulticastGroup(
const MAKRti::DtInetAddr& grpAddr,
95 MAKRti::DtInetDevice* device =
NULL );
96 virtual bool dropMulticastGroup(
const MAKRti::DtInetEndpoint& grpEndpoint,
97 MAKRti::DtInetDevice* device =
NULL );
101 virtual bool setMcastTtlOption( MAKRti::DtU32 ttl );
104 virtual void setRetryOnSend(
unsigned int numRetries,
double waitPeriod);
107 virtual MAKRti::DtU32 maxMsgSize()
const;
110 virtual bool isOpen()
const;
113 MAKRti::DtInetUdpSocket* inetUdpSocket();
121 virtual int sendPacket(caddr_t msg,
size_t msgSize,
122 const MAKRti::DtInetAddr& destAddr = MAKRti::DtInetAddr::inaddrAny(),
126 virtual int doSendPacket(caddr_t msg,
size_t msgSize,
127 const MAKRti::DtInetAddr& destAddr = MAKRti::DtInetAddr::inaddrAny(),
131 virtual int retrySendTo(caddr_t msg,
size_t msgSize,
132 const MAKRti::DtInetAddr& destAddr = MAKRti::DtInetAddr::inaddrAny(),
136 virtual int recv(caddr_t *buffptr, MAKRti::DtInetEndpoint* ep);
181 return static_cast<MAKRti::DtInetUdpSocket*
>(
mySocket.get());
std::map< MAKRti::DtInetAddr, DtMsgBundler * > myMsgBundlers
Message bundlers for outgoing messages for each destination address.
Definition: udpMsgSocket.h:144
MAKRti::DtInetEndpoint myEndpoint
The current endpoint to send to.
Definition: udpMsgSocket.h:141
bool myCompressionEnabled
Whether message compression is enabled.
Definition: udpMsgSocket.h:157
virtual void enableCompression(MAKRti::DtU8 compressionLevel)=0
Enables message compression and sets the compression level.
bool myBundlingEnabled
Whether message bundling is enabled.
Definition: udpMsgSocket.h:151
size_t myMaxPacketSize
The maximum packet size.
Definition: udpMsgSocket.h:163
This file contains the declaration of the DtMsgCompressor class.
MAKRti::DtInetUdpSocket * inetUdpSocket()
Returns a pointer to the MAKRti::DtInetUdpSocket.
Definition: udpMsgSocket.h:179
virtual int recvMessage(caddr_t *buffptr)=0
Gets the next message from the incoming data.
double mySendRetryPeriod
The wait period between send retries.
Definition: udpMsgSocket.h:169
unsigned int myMaxSendRetries
The maximum number of times to try resending.
Definition: udpMsgSocket.h:166
The DtMsgCompressor class provides a means for compressing and uncompressing messages.
Definition: msgCompressor.h:31
virtual void setFilterPort(int port)
Sets the filter port. All messages sent from this port on this machine will be filtered.
Definition: udpMsgSocket.h:116
#define NULL
Definition: baseTypes13.h:8
This file contains the declaration of the DtMsgSocket base class.
virtual int sendMessage(caddr_t msg, size_t msgSize, bool deleteAfterSend, const MAKRti::DtInetAddr &destAddr=MAKRti::DtInetAddr::inaddrAny(), int port=0)=0
Sends a message.
MAKRti::DtInetEndpoint myLastSourceEndpoint
Source endpoint of last data received.
Definition: udpMsgSocket.h:160
const size_t DtDefaultMaxPacketSize
Definition: udpMsgSocket.h:21
The DtMsgBundler class provides a means for bundling and unbundling messages.
Definition: msgBundler.h:27
This file contains the declaration of the DtMsgBundler class.
virtual void disableBundling()=0
Disables message bundling.
The DtMsgSocket provides a wrapper around the MAKRti::DtInetSocket class to operate on messages rathe...
Definition: msgSocket.h:28
DtUniquePtr< MAKRti::DtInetSocket > mySocket
The socket.
Definition: msgSocket.h:116
virtual bool flush()=0
Attempts to send any queued messages and bundled messages.
int myFilterPort
All messages sent from this port on this machine will be filtered.
Definition: udpMsgSocket.h:172
virtual int recvMessageWithSrc(caddr_t *buffptr, MAKRti::DtInetEndpoint &src)=0
Gets the next message from the stream of incoming data and sets the source of the message...
DtMsgBundler myDefaultMsgBundler
Message bundler for the default destination.
Definition: udpMsgSocket.h:148
virtual void enableBundling(size_t maxBundleSize)=0
Enables message bundling and sets the maximum bundle size.
virtual void disableCompression()=0
Disables message compression.
#define DT_DLL_RTIUTIL
Definition: rtiMsConfig.h:160
The DtUdpMsgSocket class provides an address family independent UDP socket that handles RTI messages...
Definition: udpMsgSocket.h:26
DtMsgCompressor myMsgCompressor
Message compressor and uncompressor.
Definition: udpMsgSocket.h:154
static const MAKRti::DtU32 theDefaultSockOpts
Definition: udpMsgSocket.h:174