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.
|
| virtual | ~DtDisSocket () |
| | Destructor.
|
| virtual bool | openSocket () |
| | Enable sending and receiving of packets.
|
| virtual bool | closeSocket () |
| | Close a socket.
|
| 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.
|
| virtual bool | addDestination (const DtInetEndpoint &destination) |
| | Add an additional destination.
|
| virtual void | removeDestination (const DtInetEndpoint &destination) |
| | Remove a destination.
|
| virtual DtPduFilterTest * | exerciseId () |
| | DIS PDU filtering extension interface.
|
| virtual DtPduFilterTest * | protocolVersion () |
| virtual DtPduFilterTest * | pduKind () |
| virtual DtPduFilterTest * | ipAddr () |
| virtual DtInetEndpoint & | localSenderEndpoint () const |
| | Return the endpoint of the sender.
|
| virtual DtInetSockFlushStatus | flush () |
| | Flush bundles. This method is called to flush all queued bundles.
|
| virtual int | suppressSelfReflect (int size, DtInetBufferChain &buffChain, DtInetEndpoint &ep, int *status) |
| | Supress self-reflection method.
|
| virtual int | filterExercisePdus (int size, DtInetBufferChain &buffChain, DtInetEndpoint &ep, int *status) |
| | Filter out PDUs which match the parameters configured in the DtPduFilterTests.
|
|
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.
|
| virtual int | sendTo (caddr_t packet, size_t size, DtInetEndpoint &dest, DtU32 flags=0) |
| | Sends only to the given destination.
|
| virtual int | sendChain (DtInetBufferChain &packets, DtU32 flags=0) |
| | Sends only to the given destination.
|
| virtual int | sendChainTo (DtInetBufferChain &packets, DtInetEndpoint &dest, DtU32 flags=0) |
| | Sends only to the given destination.
|
|
These methods provides an interface to all supported socket options.
These are only applied to the send socket when self-reflect suppression is enabled.
|
| virtual bool | setSendSockNonBlockingOption (bool onOrOff) |
| virtual bool | setSendSockSendBuffSize (DtU32 size) |
| virtual bool | setSendSockRcvBuffSize (DtU32 size) |
| virtual bool | setSendSockBroadcastOption (bool onOrOff) |
| virtual bool | setSendSockReuseAddrOption (bool onOrOff) |
| virtual bool | setSendSockDoNotRouteOption (bool onOrOff) |
| virtual bool | setSendSockSendLowWatermark (DtU32 size) |
| virtual bool | setSendSockRcvLowWatermark (DtU32 size) |
| virtual bool | setSendSockMcastDevice (DtInetAddr devAddr) |
| virtual bool | setSendSockMcastDevice (DtInetDevice *hostIf) |
| virtual DtU32 | getSendSockSendBuffSize () |
| virtual DtU32 | getSendSockRcvBuffSize () |
| virtual DtU32 | getSendSockBytesAvailable () |
| virtual bool | getSendSockBroadcastOption () |
| virtual bool | getSendSockReuseAddrOption () |
| virtual bool | getSendSockDoNotRouteOption () |
| virtual DtU32 | getSendSockSendLowWatermark () |
| virtual DtU32 | getSendSockRcvLowWatermark () |
|
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) |
| | Change the default time-to-live on outbound multicast packets sent from this socket.
|
| virtual bool | sendSockJoinMulticastGroup (DtInetEndpoint grpEndpoint, DtInetDevice *device=NULL) |
| | Change the default time-to-live on outbound multicast packets sent from this socket.
|
| virtual bool | sendSockDropMulticastGroup (DtInetAddr grpAddr, DtInetDevice *device=NULL) |
| | Change the default time-to-live on outbound multicast packets sent from this socket.
|
| virtual bool | sendSockDropMulticastGroup (DtInetEndpoint grpEndpoint, DtInetDevice *device=NULL) |
| | Change the default time-to-live on outbound multicast packets sent from this socket.
|
| virtual bool | setSendSockMcastTtlOption (DtU32 ttl) |
| | Change the default time-to-live on outbound multicast packets sent from this socket.
|
|
| virtual void | setBundling (int maxBundleSize, bool enableUnbundling, int minPacketSize, int sizeOffset, int sizeLength, bool testDisHeader) |
| | Bundling is only performed when using the sendChain(), sendChainTo(), recvToChain(), and recvToChainFrom() methods.
|
|
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 () |
|
Pass 0 to setUnbundling to disable unbundling, 1 to enable it.
Unbundling is enabled by default.
|
| virtual void | setUnbundling (int onOrOff) |
| virtual int | isUnbundling () |
|
If not set manually, the min.
size is based on DtNetPduHeader for backwards compatibility. Currently used only when unbundling enabled
|
| virtual void | setMinPacketSize (int size) |
| virtual int | minPacketSize () |
|
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) |
| | DtInetUdpSocket () |
| | Default Constructor.
|
| | DtInetUdpSocket (const DtInetEndpoint &dest, DtU16 localPort=0, DtInetDevice *hostIf=NULL, DtU32 flags=DtDefaultSockOpts, bool immediateOpen=true) |
| | Client Socket Constructor.
|
| virtual | ~DtInetUdpSocket () |
| | Destructor.
|
| virtual bool | setDestination (const DtInetEndpoint &dest) |
| | Set / get the destination endpoint for the socket.
|
| virtual bool | bindToDevice (const DtInetDevice *hostIf=NULL) |
| | Set the network interface device the socket will attempt to bind to on the local host.
|
| virtual bool | connectToDestination () |
| | Initiate a connection to a single unicast destination endpoint.
|
| virtual bool | disconnect () |
| | Dissolve any unicast connection and return to normal 'connectionless' operation.
|
| virtual bool | isOk () |
| | Deprecated.
|
| virtual int | descriptor () const |
| | Get the socket's descriptor.
|
| virtual bool | setSocket (const DtInetEndpoint &dest, DtU16 localPort=0, DtInetDevice *hostIf=NULL, DtU32 flags=DtDefaultSockOpts) |
| | Set all socket parameters at once.
|
| virtual void * | udpSocket () |
| | Return the underlying socket object.
|
| virtual DtInetSockRcvStatus | recv (caddr_t buff, size_t buffSize, DtU32 flags=0) |
| | Simple receive method.
|
| virtual DtInetSockRcvStatus | recvToChain (DtInetBufferChain &packets, DtU32 flags=0) |
| | Receives into a buffer chain.
|
| virtual DtInetSockRcvStatus | recvToChainFrom (DtInetBufferChain &packets, DtInetEndpoint &src, DtU32 flags=0) |
| | Simple receive method.
|
| 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 | 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.
|
| virtual bool | joinMulticastGroup (const DtInetEndpoint &grpEndpoint, DtInetDevice *device=NULL) |
| | Change the default time-to-live on outbound multicast packets sent from this socket.
|
| virtual bool | dropMulticastGroup (const DtInetAddr &grpAddr, DtInetDevice *device=NULL) |
| | Change the default time-to-live on outbound multicast packets sent from this socket.
|
| virtual bool | dropMulticastGroup (const DtInetEndpoint &grpEndpoint, DtInetDevice *device=NULL) |
| | Change the default time-to-live on outbound multicast packets sent from this socket.
|
| virtual bool | setMcastTtlOption (DtU32 ttl) |
| | Change the default time-to-live on outbound multicast packets sent from this socket.
|
| | DtInetSocket () |
| | Default Constructor.
|
| virtual | ~DtInetSocket () |
| | Destructor.
|
| virtual const DtInetEndpoint & | destination () const |
| virtual const DtInetEndpoint & | localEndpoint () const |
| | Get the local endpoint for the socket.
|
| virtual bool | setLocalPort (DtU16 port) |
| | Set / get the local port number of the socket.
|
| virtual DtU16 | localPort () const |
| virtual const DtInetDevice * | hostIf () const |
| | Get the host network interface device the socket is bound to.
|
| virtual DtInetSockState | state () |
| | Return the present state of the socket.
|
| virtual DtU32 | protocol () const |
| | Get the protocol (DtInetProtocol_TCP or DtInetProtocol_UDP)
|
virtual
DtInetUtils::DtInetAddrFamily | family () const |
| | Get the address family, IPv4 or IPv6.
|
| virtual int | getLastError () |
| | Return code or string describing last error.
|
| virtual DtString | getLastErrorString () |
| virtual bool | isErrorWouldBlockOrTryAgain () |
| virtual void | clearError () |
| virtual int | getTerminationCode () |
| | Return code or string describing termination cause.
|
| virtual DtString | getTerminationString () |
| virtual DtU64 | totalBytesSent () const |
| | Get traffic statistics.
|
| virtual DtU64 | totalPacketsSent () const |
| virtual DtU64 | totalBytesReceived () const |
| virtual DtU64 | totalPacketsReceived () const |
| virtual void | clearStats () |
| | Reset all statistics.
|
| virtual bool | addProcessingCallback (DtInetSockProcessingType kind, DtInetSocketProcessingCallback cb, void *usr, int callSequence=-1) |
| | Add / remove pre- and post- processing callbacks.
|
| virtual bool | removeProcessingCallback (DtInetSockProcessingType kind, DtInetSocketProcessingCallback cb) |
| virtual bool | isNonBlocking () const |
| virtual bool | isNoDelay () const |
| virtual bool | isIPv4 () const |
| | Return true if the socket matches the queried family or protocol.
|
| virtual bool | isIPv6 () const |
| | Return true if the socket matches the queried family or protocol.
|
| virtual bool | isTcp () const |
| | Return true if the socket matches the queried family or protocol.
|
| virtual bool | isUdp () const |
| | Return true if the socket matches the queried family or protocol.
|