VR-Link API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends
DtDisSocket Class Reference

The DtDisSocket class provides an address family independent datagram socket. More...

+ Inheritance diagram for DtDisSocket:
+ Collaboration diagram for DtDisSocket:

Classes

struct  DtDisSocketPduHeader
 

Public Member Functions

 DtDisSocket (const DtInetEndpoint &dest, DtU16 localPort=0, DtInetDevice *hostIf=NULL, DtU32 flags=DtDefaultSockOpts, bool immediateOpen=true, bool suppressSelfReflectEnabled=false)
 DIS Socket Constructor. More...
 
virtual ~DtDisSocket ()
 Destructor. More...
 
virtual bool openSocket ()
 Enable sending and receiving of packets. More...
 
virtual bool closeSocket ()
 Close a socket. More...
 
virtual DtInetSockRcvStatus recvFrom (caddr_t buff, size_t buffSize, DtInetEndpoint &src, DtU32 flags=0)
 Receive method override The DtInetUdpSocket base class revcFrom() method does not perform unbundling, PDU filtering, or self-reflect suppression. More...
 
virtual bool addDestination (const DtInetEndpoint &destination)
 Add an additional destination. More...
 
virtual void removeDestination (const DtInetEndpoint &destination)
 Remove a destination. More...
 
virtual DtPduFilterTestexerciseId ()
 DIS PDU filtering extension interface. More...
 
virtual DtPduFilterTestprotocolVersion ()
 
virtual DtPduFilterTestpduKind ()
 
virtual DtPduFilterTestipAddr ()
 
virtual DtInetEndpointlocalSenderEndpoint () const
 Return the endpoint of the sender. More...
 
virtual DtInetSockFlushStatus flush ()
 Flush bundles. This method is called to flush all queued bundles. More...
 
virtual int suppressSelfReflect (int size, DtInetBufferChain &buffChain, DtInetEndpoint &ep, int *status)
 Supress self-reflection method. More...
 
virtual int filterExercisePdus (int size, DtInetBufferChain &buffChain, DtInetEndpoint &ep, int *status)
 Filter out PDUs which match the parameters configured in the DtPduFilterTests. More...
 
virtual int minSizeFilter (int size, DtInetBufferChain &buffChain, DtInetEndpoint &ep, int *status)
 Filter PDUs that are smaller than size of DIS PDU header. More...
 
virtual void setAttributePduStrategy (DtAttributePduStrategy strat)
 Sets/Gets whether to parse for coupled attribute PDU. More...
 
virtual DtAttributePduStrategy attributePduStrategy () const
 
Send methods.

The base class send methods are overridden to provide the optional capability to bundle/unbundle and to filter self-reflects by sending PDUs from a different socket on an ephemeral port

virtual int send (caddr_t packet, size_t size, DtU32 flags=0)
 Sends only to the given destination. More...
 
virtual int sendTo (caddr_t packet, size_t size, DtInetEndpoint &dest, DtU32 flags=0)
 Sends only to the given destination. More...
 
virtual int sendChain (DtInetBufferChain &packets, DtU32 flags=0)
 Sends only to the given destination. More...
 
virtual int sendChainTo (DtInetBufferChain &packets, DtInetEndpoint &dest, DtU32 flags=0)
 Sends only to the given destination. More...
 
Overridden socket options setters.

These methods are overridden to set the option on the send socket in addition to setting it on the main socket.

virtual bool setNonBlockingOption (bool onOrOff)
 
virtual bool setSendBufferSize (DtU32 size)
 
virtual bool setReceiveBufferSize (DtU32 size)
 
virtual bool setBroadcastOption (bool onOrOff)
 
virtual bool setReuseAddressOption (bool onOrOff)
 
virtual bool setDoNotRouteOption (bool onOrOff)
 
virtual bool setSendLowWatermark (DtU32 size)
 
virtual bool setReceiveLowWatermark (DtU32 size)
 
virtual bool setSendMcastDevice (const DtInetAddr &devAddr)
 
virtual bool setMcastTtlOption (DtU32 ttl)
 Change the default time-to-live on outbound multicast packets sent from this socket. More...
 
Multicast specific methods.

Join / drop subscription to multicast group.

Socket will join group identified by the multicast address in grpAddr or grpEndpoint. If an object is passed in the port value of the endpoint will be ignored and the socket will join from the same port the socket's local endpoint uses. If no interface is specified in the join it will join on the host's default multicast interface.

virtual bool sendSockJoinMulticastGroup (DtInetAddr grpAddr, DtInetDevice *device=NULL)
 
virtual bool sendSockJoinMulticastGroup (DtInetEndpoint grpEndpoint, DtInetDevice *device=NULL)
 
virtual bool sendSockDropMulticastGroup (DtInetAddr grpAddr, DtInetDevice *device=NULL)
 
virtual bool sendSockDropMulticastGroup (DtInetEndpoint grpEndpoint, DtInetDevice *device=NULL)
 
DIS PDU bundling extension functions.
virtual void setBundling (int maxBundleSize, int sizeOffset, int sizeLength, bool testDisHeader)
 Bundling is only performed when using the sendChain(), sendChainTo(), recvToChain(), and recvToChainFrom() methods. More...
 
Set / get bundle maximum bundle size.

Setting maximum bundle size > 0 enables bundling.

Setting max bundle size to 0 disables bundling. For optimal network performance max bundle sizes should be slightly less than the MTU of the network.

virtual bool setMaxBundleSize (int size)
 
virtual int getMaxBundleSize ()
 
virtual bool isBundling ()
 
Set / get minimum valid packet size.

The minimum sized packet that can be received.

By default, size of DtDisSocketPduHeader

virtual void setMinPacketSize (int size)
 
virtual int minPacketSize ()
 
Set / get inter PDU byte alignment in bytes
virtual void setBundleByteAlignment (DtU32 size)
 
virtual DtU32 sendBundleByteAlignment ()
 
virtual DtU32 receiveBundleByteAlignment (int protocolVersion)
 
Bundling methods.

These methods are called from the bundling callback functions to perform the actual work.

virtual int addToBundle (int size, DtInetBufferChain &buffChain, DtInetEndpoint &ep)
 
virtual int unbundle (int size, DtInetBufferChain &buffChain, DtInetEndpoint &ep, int *status)
 
virtual int getNextBundle (int size, DtInetBufferChain &buffChain, DtInetEndpoint &ep, int *status)
 
virtual DtInetSockFlushStatus flushBundle (DtInetEndpoint &ep)
 
- Public Member Functions inherited from DtInetUdpSocket
 DtInetUdpSocket ()
 Default Constructor. More...
 
 DtInetUdpSocket (const DtInetEndpoint &dest, DtU16 localPort=0, DtInetDevice *hostIf=NULL, DtU32 flags=DtDefaultSockOpts, bool immediateOpen=true)
 Client Socket Constructor. More...
 
virtual ~DtInetUdpSocket ()
 Destructor. More...
 
virtual bool setDestination (const DtInetEndpoint &dest)
 Set / get the destination endpoint for the socket. More...
 
virtual bool bindToDevice (const DtInetDevice *hostIf=NULL)
 Set the network interface device the socket will attempt to bind to on the local host. More...
 
virtual bool connectToDestination ()
 Initiate a connection to a single unicast destination endpoint. More...
 
virtual bool disconnect ()
 Dissolve any unicast connection and return to normal 'connectionless' operation. More...
 
virtual bool isOk ()
 Deprecated. More...
 
virtual unsigned descriptor () const
 Get the socket's descriptor. More...
 
virtual bool setSocket (const DtInetEndpoint &dest, DtU16 localPort=0, DtInetDevice *hostIf=NULL, DtU32 flags=DtDefaultSockOpts)
 Set all socket parameters at once. More...
 
virtual void * udpSocket ()
 Return the underlying socket object. More...
 
virtual void * secondUdpSocket ()
 Return the second underlying socket object. More...
 
virtual DtInetSockRcvStatus recv (caddr_t buff, size_t buffSize, DtU32 flags=0)
 Simple receive method. More...
 
virtual DtInetSockRcvStatus recvToChain (DtInetBufferChain &packets, DtU32 flags=0)
 Receives into a buffer chain. More...
 
virtual DtInetSockRcvStatus recvToChainFrom (DtInetBufferChain &packets, DtInetEndpoint &src, DtU32 flags=0)
 Simple receive method. More...
 
virtual bool setMcastDevice (const DtInetAddr &devAddr)
 
virtual bool setMcastDevice (DtInetDevice *hostIf)
 
virtual DtU32 getSendBufferSize ()
 
virtual DtU32 getReceiveBufferSize ()
 
virtual DtU32 getBytesAvailable ()
 
virtual bool getBroadcastOption ()
 
virtual bool getReuseAddressOption ()
 
virtual bool getDoNotRouteOption ()
 
virtual DtU32 getSendLowWatermark ()
 
virtual DtU32 getReceiveLowWatermark ()
 
virtual bool joinMulticastGroup (const DtInetAddr &grpAddr, DtInetDevice *device=NULL)
 Change the default time-to-live on outbound multicast packets sent from this socket. More...
 
virtual bool joinMulticastGroup (const DtInetEndpoint &grpEndpoint, DtInetDevice *device=NULL)
 Change the default time-to-live on outbound multicast packets sent from this socket. More...
 
virtual bool dropMulticastGroup (const DtInetAddr &grpAddr, DtInetDevice *device=NULL)
 Change the default time-to-live on outbound multicast packets sent from this socket. More...
 
virtual bool dropMulticastGroup (const DtInetEndpoint &grpEndpoint, DtInetDevice *device=NULL)
 Change the default time-to-live on outbound multicast packets sent from this socket. More...
 
- Public Member Functions inherited from DtInetSocket
 DtInetSocket ()
 Default Constructor. More...
 
virtual ~DtInetSocket ()
 Destructor. More...
 
virtual const DtInetEndpointdestination () const
 
virtual const DtInetEndpointlocalEndpoint () const
 Get the local endpoint for the socket. More...
 
virtual bool setLocalPort (DtU16 port)
 Set / get the local port number of the socket. More...
 
virtual DtU16 localPort () const
 
virtual const DtInetDevicehostIf () const
 Get the host network interface device the socket is bound to. More...
 
virtual DtInetSockState state ()
 Return the present state of the socket. More...
 
virtual DtU32 protocol () const
 Get the protocol (DtInetProtocol_TCP or DtInetProtocol_UDP) More...
 
virtual
DtInetUtils::DtInetAddrFamily 
family () const
 Get the address family, IPv4 or IPv6. More...
 
virtual DtU32 flags ()
 Get the flags for this socket. More...
 
virtual int getLastError ()
 Return code or string describing last error. More...
 
virtual DtString getLastErrorString ()
 
virtual bool isErrorWouldBlockOrTryAgain ()
 
virtual void clearError ()
 
virtual int getTerminationCode ()
 Return code or string describing termination cause. More...
 
virtual DtString getTerminationString ()
 
virtual DtU64 totalBytesSent () const
 Get traffic statistics. More...
 
virtual DtU64 totalPacketsSent () const
 
virtual DtU64 totalBytesReceived () const
 
virtual DtU64 totalPacketsReceived () const
 
virtual void clearStats ()
 Reset all statistics. More...
 
virtual bool addProcessingCallback (DtInetSockProcessingType kind, DtInetSocketProcessingCallback cb, void *usr, int callSequence=-1)
 Add / remove pre- and post- processing callbacks. More...
 
virtual bool removeProcessingCallback (DtInetSockProcessingType kind, DtInetSocketProcessingCallback cb)
 
virtual DtTime receiveTime ()
 
virtual bool isNonBlocking () const
 
virtual bool isNoDelay () const
 
virtual bool isIPv4 () const
 Return true if the socket matches the queried family or protocol. More...
 
virtual bool isIPv6 () const
 Return true if the socket matches the queried family or protocol. More...
 
virtual bool isTcp () const
 Return true if the socket matches the queried family or protocol. More...
 
virtual bool isUdp () const
 Return true if the socket matches the queried family or protocol. More...
 

Protected Member Functions

virtual void * disSendSocket ()
 Return the underlying Boost class socket objects. More...
 
virtual DtU16 getPduSize (DtDisSocketPduHeader *hdr, int hdrOffset, DtInetBufferChain::iterator current, DtInetBufferChain::iterator end, int *status, bool &isCoupling, bool expectAttributePdu=false)
 
virtual DtU16 getCoupledAttributePduSize (DtDisSocketPduHeader *hdr, int hdrOffset, DtInetBufferChain::iterator current, DtInetBufferChain::iterator end, int *status, int pduLengthAndPadding, unsigned int size)
 
virtual DtInetBufferChain::iterator advanceToOffset (DtU16 &offset, DtInetBufferChain::iterator chainIter, DtInetBufferChain::iterator chainEnd)
 
- Protected Member Functions inherited from DtInetSocket
virtual bool findAndRemoveCallback (DtInetSockCallbackList &cbList, DtInetSocketProcessingCallback cb)
 

Static Protected Member Functions

static int suppressSelfReflect (DtInetSocket *sock, int size, DtInetBufferChain &buffChain, DtInetEndpoint &ep, void *usr)
 Suppress self-reflection callback. More...
 
static int filterExercisePdus (DtInetSocket *sock, int size, DtInetBufferChain &buffChain, DtInetEndpoint &ep, void *usr)
 PDU filtering callback. More...
 
static int minSizeFilter (DtInetSocket *sock, int size, DtInetBufferChain &buffChain, DtInetEndpoint &ep, void *usr)
 Filter PDUs that are smaller than size of DIS PDU header. More...
 
Bundling callbacks.

All pre- and post- processing callbacks must return the total number of bytes in buffChain after processing or a negative value if an error occurs.

The static methods are registered as callbacks, but the actual work takes place in the bundling methods.

static int addToBundle (DtInetSocket *sock, int size, DtInetBufferChain &buffChain, DtInetEndpoint &ep, void *usr)
 
static int flushBundle (DtInetSocket *sock, int size, DtInetBufferChain &buffChain, DtInetEndpoint &ep, void *usr)
 
static int unbundle (DtInetSocket *sock, int size, DtInetBufferChain &buffChain, DtInetEndpoint &ep, void *usr)
 
static int getNextBundle (DtInetSocket *sock, int size, DtInetBufferChain &buffChain, DtInetEndpoint &ep, void *usr)
 

Protected Attributes

void * mySendSocketIoService
 Using Void pointer to abstract a boost type actual type: boost::asio::io_service*. More...
 
void * mySendSocket
 Using Void pointer to abstract a boost type actual type: boost::asio::ip::udp::socket*. More...
 
DtInetEndpoint mySendEndpoint
 
std::set< DtInetEndpointmyAdditionalDestinations
 
bool mySuppressSelfReflect
 
DtInetUtils::DtInetSockOutboundBundleMap myOutboundBundles
 
DtInetUtils::DtInetSockInboundBundleQueue myInboundBundles
 
int myMaxBundleSize
 
DtU32 myBundleByteAlignment
 
int myMinPacketSize
 
DtPduFilterTest myVersionFilter
 
DtPduFilterTest myExerciseFilter
 
DtPduFilterTest myKindFilter
 
DtPduFilterTest myAddrFilter
 
DtMutex myMonitor
 
boolmyUseMonitor
 
DtAttributePduStrategy myAttributePduStrategy
 
- Protected Attributes inherited from DtInetUdpSocket
void * myIoService
 
void * myUdpSocket
 
void * mySecondUdpSocket
 
DtInetMcastGroupBindings myMcastGroups
 
DtClock myReceiveClock
 
- Protected Attributes inherited from DtInetSocket
DtInetEndpoint myLocalEndpoint
 
DtInetEndpoint myRemoteEndpoint
 
DtInetDevicemyHostIf
 
DtInetSockState myState
 
DtU32 myFlags
 
bool myAsync
 
bool myNonBlockingEnabled
 
bool myNoDelayEnabled
 
bool myStartImmediately
 
int myErrorCode
 
DtString myErrorString
 
int myTerminationCode
 
DtString myTerminationString
 
DtInetSockCallbackList myPreRecvCallbacks
 
DtInetSockCallbackList myPostRecvCallbacks
 
DtInetSockCallbackList myPreSendCallbacks
 
DtInetSockCallbackList myPostSendCallbacks
 
DtU64 mySentByteCount
 
DtU64 mySentPacketCount
 
DtU64 myReceivedByteCount
 
DtU64 myReceivedPacketCount
 
DtTime myReceiveTime
 

Private Member Functions

 DtDisSocket (const DtDisSocket &orig)
 Copy constructor not implemented. More...
 
DtDisSocketoperator= (const DtDisSocket &orig)
 Assignment not implemented. More...
 

Private Attributes

DtDisSockPimplmyAsyncSendSockPimpl
 

Friends

class DtDisSockPimpl
 For async operations. More...
 

Additional Inherited Members

- Protected Types inherited from DtInetUdpSocket
typedef std::pair< DtInetAddr,
DtInetAddr
DtInetMcastGroupIntfcBinding
 Associate the multicast group address with the host interface address the group is joined from. More...
 
typedef std::vector
< DtInetMcastGroupIntfcBinding
DtInetMcastGroupBindings
 

Detailed Description

The DtDisSocket class provides an address family independent datagram socket.

Constructor & Destructor Documentation

DtDisSocket::DtDisSocket ( const DtInetEndpoint dest,
DtU16  localPort = 0,
DtInetDevice hostIf = NULL,
DtU32  flags = DtDefaultSockOpts,
bool  immediateOpen = true,
bool  suppressSelfReflectEnabled = false 
)

DIS Socket Constructor.

Takes a destination endpoint, a source port to use, a pointer to the local network interface device the socket will be bound to, socket option flags, an 'immediateOpen' indicator dictating how the socket should behave upon creation, and a flag to enable self- reflect suppression. If the destination endpoint port is 0 the default DIS port (3000) will be used. The address family (IPv4 or IPv6) is assumed from the destination endpoint object. If suppressSelfReflect is true all packets will be sent from the specified local port or an automatically chosen ephemeral if the localPort parameter is 0. If no host interface is specified the most appropriate interface will be chosen based on the destination. If the destination endpoint specifies a multicast address the multicast group is joined automatically when the socket is opened and the group membership is dropped when the socket is closed. If the 'immediateOpen' parameter is true the socket will immediately try to bind to an interface and allow datagrams to be sent and received. To use custom packet handlers for the send and receive functions the handlers must be set before any call to any of the send and receive methods. To ensure the handlers are configured it is recommended that 'immediateOpen' be set to false so the packet handler callbacks can be configured, then call openSocket(). This ctor will not throw exceptions on failure. Check the socket status by calling state() (or isOk()) to determine if the socket is ready.

virtual DtDisSocket::~DtDisSocket ( )
virtual

Destructor.

DtDisSocket::DtDisSocket ( const DtDisSocket orig)
private

Copy constructor not implemented.

Member Function Documentation

virtual bool DtDisSocket::addDestination ( const DtInetEndpoint destination)
virtual

Add an additional destination.

Packets will be sent to these destinations in addition to the sockets destination. Return indicates if destination was added successfully (true) or not (false).

virtual int DtDisSocket::addToBundle ( int  size,
DtInetBufferChain buffChain,
DtInetEndpoint ep 
)
virtual
static int DtDisSocket::addToBundle ( DtInetSocket sock,
int  size,
DtInetBufferChain buffChain,
DtInetEndpoint ep,
void *  usr 
)
staticprotected
virtual DtInetBufferChain::iterator DtDisSocket::advanceToOffset ( DtU16 offset,
DtInetBufferChain::iterator  chainIter,
DtInetBufferChain::iterator  chainEnd 
)
protectedvirtual
virtual DtAttributePduStrategy DtDisSocket::attributePduStrategy ( ) const
virtual
virtual bool DtDisSocket::closeSocket ( )
virtual

Close a socket.

Returns true on successful close or false on failure. Call getLastError() and getLastErrorString() to retrieve cause of failure. The base class method is overridden to provide the optional capability to filter self-reflects by sending PDUs from a different socket on an ephemeral port

Reimplemented from DtInetUdpSocket.

virtual void* DtDisSocket::disSendSocket ( )
protectedvirtual

Return the underlying Boost class socket objects.

DtPduFilterTest * DtDisSocket::exerciseId ( )
inlinevirtual

DIS PDU filtering extension interface.

virtual int DtDisSocket::filterExercisePdus ( int  size,
DtInetBufferChain buffChain,
DtInetEndpoint ep,
int status 
)
virtual

Filter out PDUs which match the parameters configured in the DtPduFilterTests.

static int DtDisSocket::filterExercisePdus ( DtInetSocket sock,
int  size,
DtInetBufferChain buffChain,
DtInetEndpoint ep,
void *  usr 
)
staticprotected

PDU filtering callback.

This should always be added to the callbacks. The individual filtering tests can be enabled / disabled on the fly.

virtual DtInetSockFlushStatus DtDisSocket::flush ( )
virtual

Flush bundles. This method is called to flush all queued bundles.

virtual DtInetSockFlushStatus DtDisSocket::flushBundle ( DtInetEndpoint ep)
virtual
static int DtDisSocket::flushBundle ( DtInetSocket sock,
int  size,
DtInetBufferChain buffChain,
DtInetEndpoint ep,
void *  usr 
)
staticprotected
virtual DtU16 DtDisSocket::getCoupledAttributePduSize ( DtDisSocketPduHeader hdr,
int  hdrOffset,
DtInetBufferChain::iterator  current,
DtInetBufferChain::iterator  end,
int status,
int  pduLengthAndPadding,
unsigned int  size 
)
protectedvirtual
virtual int DtDisSocket::getMaxBundleSize ( )
virtual
virtual int DtDisSocket::getNextBundle ( int  size,
DtInetBufferChain buffChain,
DtInetEndpoint ep,
int status 
)
virtual
static int DtDisSocket::getNextBundle ( DtInetSocket sock,
int  size,
DtInetBufferChain buffChain,
DtInetEndpoint ep,
void *  usr 
)
staticprotected
virtual DtU16 DtDisSocket::getPduSize ( DtDisSocketPduHeader hdr,
int  hdrOffset,
DtInetBufferChain::iterator  current,
DtInetBufferChain::iterator  end,
int status,
bool isCoupling,
bool  expectAttributePdu = false 
)
protectedvirtual
DtPduFilterTest * DtDisSocket::ipAddr ( )
inlinevirtual
virtual bool DtDisSocket::isBundling ( )
virtual
virtual DtInetEndpoint& DtDisSocket::localSenderEndpoint ( ) const
virtual

Return the endpoint of the sender.

This will differ from the receiving endpoint when self-reflect suppression is enabled.

virtual int DtDisSocket::minPacketSize ( )
virtual
virtual int DtDisSocket::minSizeFilter ( int  size,
DtInetBufferChain buffChain,
DtInetEndpoint ep,
int status 
)
virtual

Filter PDUs that are smaller than size of DIS PDU header.

static int DtDisSocket::minSizeFilter ( DtInetSocket sock,
int  size,
DtInetBufferChain buffChain,
DtInetEndpoint ep,
void *  usr 
)
staticprotected

Filter PDUs that are smaller than size of DIS PDU header.

virtual bool DtDisSocket::openSocket ( )
virtual

Enable sending and receiving of packets.

Returns true on success or false on failure. Call getLastError() and getLastErrorString() to retrieve cause of failure. The base class method is overridden to provide the optional capability to filter self-reflects by sending PDUs from a different socket on an ephemeral port

Reimplemented from DtInetUdpSocket.

DtDisSocket& DtDisSocket::operator= ( const DtDisSocket orig)
private

Assignment not implemented.

DtPduFilterTest * DtDisSocket::pduKind ( )
inlinevirtual
DtPduFilterTest * DtDisSocket::protocolVersion ( )
inlinevirtual
virtual DtU32 DtDisSocket::receiveBundleByteAlignment ( int  protocolVersion)
virtual
virtual DtInetSockRcvStatus DtDisSocket::recvFrom ( caddr_t  buff,
size_t  buffSize,
DtInetEndpoint src,
DtU32  flags = 0 
)
virtual

Receive method override The DtInetUdpSocket base class revcFrom() method does not perform unbundling, PDU filtering, or self-reflect suppression.

For backward compatibility those additional tasks are supported in all DIS socket receive methods.

Reimplemented from DtInetUdpSocket.

virtual void DtDisSocket::removeDestination ( const DtInetEndpoint destination)
virtual

Remove a destination.

Address will be removed from the list of additional destinations for sending packets.

virtual int DtDisSocket::send ( caddr_t  packet,
size_t  size,
DtU32  flags = 0 
)
virtual

Sends only to the given destination.

Reimplemented from DtInetUdpSocket.

virtual DtU32 DtDisSocket::sendBundleByteAlignment ( )
virtual
virtual int DtDisSocket::sendChain ( DtInetBufferChain packets,
DtU32  flags = 0 
)
virtual

Sends only to the given destination.

Reimplemented from DtInetUdpSocket.

virtual int DtDisSocket::sendChainTo ( DtInetBufferChain packets,
DtInetEndpoint dest,
DtU32  flags = 0 
)
virtual

Sends only to the given destination.

Reimplemented from DtInetUdpSocket.

virtual bool DtDisSocket::sendSockDropMulticastGroup ( DtInetAddr  grpAddr,
DtInetDevice device = NULL 
)
virtual
virtual bool DtDisSocket::sendSockDropMulticastGroup ( DtInetEndpoint  grpEndpoint,
DtInetDevice device = NULL 
)
virtual
virtual bool DtDisSocket::sendSockJoinMulticastGroup ( DtInetAddr  grpAddr,
DtInetDevice device = NULL 
)
virtual
virtual bool DtDisSocket::sendSockJoinMulticastGroup ( DtInetEndpoint  grpEndpoint,
DtInetDevice device = NULL 
)
virtual
virtual int DtDisSocket::sendTo ( caddr_t  packet,
size_t  size,
DtInetEndpoint dest,
DtU32  flags = 0 
)
virtual

Sends only to the given destination.

Reimplemented from DtInetUdpSocket.

virtual void DtDisSocket::setAttributePduStrategy ( DtAttributePduStrategy  strat)
virtual

Sets/Gets whether to parse for coupled attribute PDU.

virtual bool DtDisSocket::setBroadcastOption ( bool  onOrOff)
virtual

Reimplemented from DtInetUdpSocket.

virtual void DtDisSocket::setBundleByteAlignment ( DtU32  size)
virtual
virtual void DtDisSocket::setBundling ( int  maxBundleSize,
int  sizeOffset,
int  sizeLength,
bool  testDisHeader 
)
virtual

Bundling is only performed when using the sendChain(), sendChainTo(), recvToChain(), and recvToChainFrom() methods.

If maxBundleSize == 0 bundling is disabled. Unbundling is always enabled. Deprecated. Provided for backwards compatibility.

Set all bundling parameters at once. The sizeOffset, sizeLength, and testDisHeader arguments are ignored.

virtual bool DtDisSocket::setDoNotRouteOption ( bool  onOrOff)
virtual

Reimplemented from DtInetUdpSocket.

virtual bool DtDisSocket::setMaxBundleSize ( int  size)
virtual
virtual bool DtDisSocket::setMcastTtlOption ( DtU32  ttl)
virtual

Change the default time-to-live on outbound multicast packets sent from this socket.

Reimplemented from DtInetUdpSocket.

virtual void DtDisSocket::setMinPacketSize ( int  size)
virtual
virtual bool DtDisSocket::setNonBlockingOption ( bool  onOrOff)
virtual

Reimplemented from DtInetUdpSocket.

virtual bool DtDisSocket::setReceiveBufferSize ( DtU32  size)
virtual

Reimplemented from DtInetUdpSocket.

virtual bool DtDisSocket::setReceiveLowWatermark ( DtU32  size)
virtual

Reimplemented from DtInetUdpSocket.

virtual bool DtDisSocket::setReuseAddressOption ( bool  onOrOff)
virtual

Reimplemented from DtInetUdpSocket.

virtual bool DtDisSocket::setSendBufferSize ( DtU32  size)
virtual

Reimplemented from DtInetUdpSocket.

virtual bool DtDisSocket::setSendLowWatermark ( DtU32  size)
virtual

Reimplemented from DtInetUdpSocket.

virtual bool DtDisSocket::setSendMcastDevice ( const DtInetAddr devAddr)
virtual
virtual int DtDisSocket::suppressSelfReflect ( int  size,
DtInetBufferChain buffChain,
DtInetEndpoint ep,
int status 
)
virtual

Supress self-reflection method.

Filters out PDUs which originated from this socket's send port.

static int DtDisSocket::suppressSelfReflect ( DtInetSocket sock,
int  size,
DtInetBufferChain buffChain,
DtInetEndpoint ep,
void *  usr 
)
staticprotected

Suppress self-reflection callback.

The real work is done by the public suppressSelfReflect method

virtual int DtDisSocket::unbundle ( int  size,
DtInetBufferChain buffChain,
DtInetEndpoint ep,
int status 
)
virtual
static int DtDisSocket::unbundle ( DtInetSocket sock,
int  size,
DtInetBufferChain buffChain,
DtInetEndpoint ep,
void *  usr 
)
staticprotected

Friends And Related Function Documentation

friend class DtDisSockPimpl
friend

For async operations.

Member Data Documentation

std::set<DtInetEndpoint> DtDisSocket::myAdditionalDestinations
protected
DtPduFilterTest DtDisSocket::myAddrFilter
protected
DtDisSockPimpl* DtDisSocket::myAsyncSendSockPimpl
private
DtAttributePduStrategy DtDisSocket::myAttributePduStrategy
protected
DtU32 DtDisSocket::myBundleByteAlignment
protected
DtPduFilterTest DtDisSocket::myExerciseFilter
protected
DtInetUtils::DtInetSockInboundBundleQueue DtDisSocket::myInboundBundles
protected
DtPduFilterTest DtDisSocket::myKindFilter
protected
int DtDisSocket::myMaxBundleSize
protected
int DtDisSocket::myMinPacketSize
protected
DtMutex DtDisSocket::myMonitor
protected
DtInetUtils::DtInetSockOutboundBundleMap DtDisSocket::myOutboundBundles
protected
DtInetEndpoint DtDisSocket::mySendEndpoint
protected
void* DtDisSocket::mySendSocket
protected

Using Void pointer to abstract a boost type actual type: boost::asio::ip::udp::socket*.

void* DtDisSocket::mySendSocketIoService
protected

Using Void pointer to abstract a boost type actual type: boost::asio::io_service*.

bool DtDisSocket::mySuppressSelfReflect
protected
bool& DtDisSocket::myUseMonitor
protected
DtPduFilterTest DtDisSocket::myVersionFilter
protected

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

Document ID: Generated on Thu Oct 16 00:12:25 EDT 2025 from SVN revision 280738
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)