VR-Link API Documentation for HLA Evolved
Classes
vlInetSocket.h File Reference

This file contains the declaration of the DtInetSocket base class. More...

Go to the source code of this file.

Classes

class  DtInetSocketProcessingCbInfo
class  DtInetSocket
 The DtInetSocket class provides a protocol independant, address family independant base class for TCP or UDP socket subclasses. More...

Macros

DtInetSocket Macros

Define the flags that can be or'ed together and passed to DtInetSocket constructors.

Marks the Socket as Readable.

#define DtRead   ((DtU32) 0x01)
 Marks the Socket as Writable.
#define DtWrite   ((DtU32) 0x02)
 Marks the Socket as Writable.
#define DtReadWrite   (DtRead | DtWrite)
 Marks the Socket as Read and Writable.
#define DtBindToDestAddr   ((DtU32) 0x08)
 Tells the socket to listen only to traffic sent to exactly the address indicated by destAddr.
#define DtQuiet   ((DtU32) 0x10)
 Tells the socket to not print informational messages.
#define DtSockOptStrictMulticastBinding   ((DtU32) 0x20)
 Tells UDP sockets to bind to a multicast address, not an interface address, for multicast communications on Linux.
#define DtSockOptNonBlocking   ((DtU32) MSG_DONTWAIT)
 Tells the socket to operate in non-blocking mode when set.
#define DtSockOptNoDelay   ((DtU32) 0x80)
 Tell TCP sockets to disable Nagle packet coalescing and enables TCP_NODELAY operation.
#define DtSockAsyncRead   ((DtU32) 0x100)
 Tells the socket to use asynchronous read (recv) or write (send) operations.
#define DtSockAsyncWrite   ((DtU32) 0x200)
 Marks the Socket as Writable.
#define DtAsyncReadWrite   (DtSockAsyncRead | DtSockAsyncWrite)
 Marks the Socket as Writable.
#define DtSockWriteable   ((DtU32)DtWrite | DtSockAsyncWrite)
 Marks the Socket as Writable.
#define DtSockReadable   ((DtU32)DtRead | DtSockAsyncRead)
 Marks the Socket as Writable.
#define DtSockOptAddrReuse   ((DtU32) 0x400)
 Tells the socket to allow address and/or port reuse.
#define DtSockOptPortReuse   ((DtU32) 0x800)
 Marks the Socket as Writable.
#define DtSockOptAllReuse   (DtSockOptAddrReuse | DtSockOptPortReuse)
 Marks the Socket as Writable.
#define DtSockDisablePreProcCallbacks   ((DtU32) 0x1000)
 Tells the sendChain(), sendChainTo(), recvToChain(), and recvToChainFrom() methods to skip the pre- and post- processing callbacks.
#define DtSockDisablePostProcCallbacks   ((DtU32) 0x2000)
 Marks the Socket as Writable.
#define DtSockDisableCallbacks   (DtSockDisablePreProcCallbacks || DtSockDisablePostProcCallbacks)
 Marks the Socket as Writable.
#define DtDefaultSockOpts   (DtU32)(DtReadWrite | DtSockOptAllReuse | DtSockOptNoDelay)
 Marks the Socket as Writable.

DtInetSocket Types

Define the types used by DtInetSocket class

Buffer sequence compatible with Boost ConstBufferSequence and MutableBufferSequence for scatter / gather operations.

enum  DtInetSockState {
  DtInetSockState_ERROR = -1, DtInetSockState_NOT_INITIALIZED = 0, DtInetSockState_INITIALIZED, DtInetSockState_OPEN,
  DtInetSockState_LISTENING, DtInetSockState_INPROGRESS, DtInetSockState_CONN_REFUSED, DtInetSockState_CONNECTED,
  DtInetSockState_TIMEDOUT, DtInetSockState_DISCONNECTED, DtInetSockState_CLOSED
}
 Socket state enumeration. More...
enum  DtInetSockRcvStatus {
  DtInetSockRcv_UNBUNDLED_PACKET = -5, DtInetSockRcv_BUFFER_TOO_SMALL = -4, DtInetSockRcv_FILTERED_BY_PORT = -3, DtInetSockRcv_FILTERED_PACKET = -2,
  DtInetSockRcv_ERROR = -1, DtInetSockRcv_NO_PACKET = 0, DtInetSockRcv_MAX_RETVAL = INT_MAX
}
 Socket state enumeration. More...
enum  DtInetSockFlushStatus { DtInetSockFlush_ERROR = -1, DtInetSockFlush_MORE_TO_FLUSH = 0, DtInetSockFlush_FLUSH_COMPLETE = 1 }
 Socket state enumeration. More...
enum  DtInetSockProcessingType { DtInetSockProcess_PRE_RECV, DtInetSockProcess_POST_RECV, DtInetSockProcess_PRE_SEND, DtInetSockProcess_POST_SEND }
 Socket state enumeration. More...
typedef std::vector< char > DtInetBuffer
 Socket state enumeration.
typedef std::vector
< DtInetBuffer * > 
DtInetBufferChain
 Socket state enumeration.
typedef std::pair< void
*, DtInetBuffer * > 
DtInetBuffQueueEntry
 Socket state enumeration.
typedef DtThreadSafe
< std::deque
< DtInetBuffQueueEntry > > 
DtInetThreadSafeQueue
 Socket state enumeration.
typedef int(* DtInetSocketProcessingCallback )(DtInetSocket *sock, int size, DtInetBufferChain &buffChain, DtInetEndpoint &ep, void *usr)
 Callbacks Pre- / Post- processing callback prototype.
typedef std::multimap< int,
DtInetSocketProcessingCbInfo * > 
DtInetSockCallbackList
 Socket state enumeration.

Detailed Description

This file contains the declaration of the DtInetSocket base class.

Macro Definition Documentation

#define DtAsyncReadWrite   (DtSockAsyncRead | DtSockAsyncWrite)

Marks the Socket as Writable.

#define DtBindToDestAddr   ((DtU32) 0x08)

Tells the socket to listen only to traffic sent to exactly the address indicated by destAddr.

That is, ignore unicast if dest_Addr is broadcast, etc. THIS OPTION SHOULD NOT BE USED WITH THE DtInetSocket CLASS. THE MACRO IS DEFINED ONLY FOR CONSISTENCY WITH THE OLD SOCKET CLASS. IT WILL BE REMOVED WHEN THE OLD SOCKET STUFF IS REMOVED FROM VL-UTILS

#define DtDefaultSockOpts   (DtU32)(DtReadWrite | DtSockOptAllReuse | DtSockOptNoDelay)

Marks the Socket as Writable.

#define DtQuiet   ((DtU32) 0x10)

Tells the socket to not print informational messages.

THIS OPTION SHOULD NOT BE USED WITH THE DtInetSocket CLASS. THE MACRO IS DEFINED ONLY FOR CONSISTENCY WITH THE OLD SOCKET CLASS. IT WILL BE REMOVED WHEN THE OLD SOCKET STUFF IS REMOVED FROM VL-UTILS

#define DtRead   ((DtU32) 0x01)

Marks the Socket as Writable.

#define DtReadWrite   (DtRead | DtWrite)

Marks the Socket as Read and Writable.

#define DtSockAsyncRead   ((DtU32) 0x100)

Tells the socket to use asynchronous read (recv) or write (send) operations.

Synchronous methods can be used even when asynchronous operation is enabled, but only with great care. For instance you can use async receive (read) while using synchronous sends (write), but doing some async sends interspersed with synchronous sends is dangerous. If async operation is not required it should not be enabled as it wastes thread resources.

#define DtSockAsyncWrite   ((DtU32) 0x200)

Marks the Socket as Writable.

#define DtSockDisableCallbacks   (DtSockDisablePreProcCallbacks || DtSockDisablePostProcCallbacks)

Marks the Socket as Writable.

#define DtSockDisablePostProcCallbacks   ((DtU32) 0x2000)

Marks the Socket as Writable.

#define DtSockDisablePreProcCallbacks   ((DtU32) 0x1000)

Tells the sendChain(), sendChainTo(), recvToChain(), and recvToChainFrom() methods to skip the pre- and post- processing callbacks.

#define DtSockOptAddrReuse   ((DtU32) 0x400)

Tells the socket to allow address and/or port reuse.

Note that port reuse may note be available as a separate option on some platforms.

#define DtSockOptAllReuse   (DtSockOptAddrReuse | DtSockOptPortReuse)

Marks the Socket as Writable.

#define DtSockOptNoDelay   ((DtU32) 0x80)

Tell TCP sockets to disable Nagle packet coalescing and enables TCP_NODELAY operation.

Ignored by datagram (UDP) sockets.

#define DtSockOptNonBlocking   ((DtU32) MSG_DONTWAIT)

Tells the socket to operate in non-blocking mode when set.

#define DtSockOptPortReuse   ((DtU32) 0x800)

Marks the Socket as Writable.

#define DtSockOptStrictMulticastBinding   ((DtU32) 0x20)

Tells UDP sockets to bind to a multicast address, not an interface address, for multicast communications on Linux.

Does not impact non-Linux implementations. Refer to VR-Link documentation for a complete explanation of this option.

#define DtSockReadable   ((DtU32)DtRead | DtSockAsyncRead)

Marks the Socket as Writable.

#define DtSockWriteable   ((DtU32)DtWrite | DtSockAsyncWrite)

Marks the Socket as Writable.

#define DtWrite   ((DtU32) 0x02)

Marks the Socket as Writable.


Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)