VR-Link API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
+ Inheritance diagram for DtGroupSocket:
+ Collaboration diagram for DtGroupSocket:

Public Member Functions

 DtGroupSocket (int port=DtDEFAULT_PORT, DtU8 flags=DtReadWrite, DtIpv4Addr devAddr=0)
 Constructor - uses default address for listening. More...
 
 DtGroupSocket (int port, DtIpv4Addr addr, DtU8 flags, DtIpv4Addr devAddr=0)
 Constructor - uses addr for listening. More...
 
virtual ~DtGroupSocket ()
 Destructor. More...
 
virtual void removeAllRemoteSites ()
 Clear the list of remote sites. More...
 
virtual int DtSend (caddr_t pkt, size_t size, DtIpv4Addr addr)
 Virtual function override - send to all remote sites. More...
 
virtual void addRemoteSite (DtIpv4Addr addr)
 Add/remove a remote site to send to. More...
 
virtual void removeRemoteSite (DtIpv4Addr addr)
 
virtual int sendToAllRemoteSites (caddr_t pkt, size_t size, DtIpv4Addr dwSkipAddr=0)
 Send to all remote sites except dwSkipAddr. More...
 
virtual const DtListremoteSitesList () const
 Return the remote sites list. More...
 
- Public Member Functions inherited from DtNetSocket
 DtNetSocket (int port=DtDEFAULT_PORT, DtU8 flags=DtReadWrite, DtIpv4Addr devAddr=0)
 Constructor. More...
 
 DtNetSocket (int port, DtIpv4Addr destAddr, DtU8 flags, DtIpv4Addr devAddr=0)
 Constructor. More...
 
 DtNetSocket (char *dummy, int sockfd, DtU8 flags=DtReadWrite)
 Allows you to create a DtNetSocket that uses a pre-existing socket. More...
 
virtual ~DtNetSocket ()
 Destructor. More...
 
virtual int sendTo (caddr_t packet, size_t size, DtIpv4Addr addr)
 Virtual function override. More...
 
virtual int DtRecv (caddr_t *buffptr, int *status=NULL)
 DtNetSocket implements DtRecv by calling a system call to recvfrom on its UDP socket. More...
 
virtual int DtRecv (caddr_t buff, size_t)
 DtNetSocket implements DtRecv by calling a system call to recvfrom on its UDP socket. More...
 
virtual DtIpv4Addr lastSourceInetAddr ()
 Return the IP address of the sender of the last packet we've received. More...
 
virtual void DtBecomeNonBlocking (void)
 Make the socket non-blocking. More...
 
virtual int readFd ()
 Return read/write file descriptor of the UDP socket being used for sending and receiving. More...
 
virtual int writeFd ()
 
virtual bool isOk () const
 Returns 1 if the socket's constructor initialization was successful, 0 otherwise. More...
 
virtual int setMcastTtl (int ttl)
 Set the TTL (time to live) value for multicast packets. More...
 
virtual void setFilterPort (const int &port)
 
virtual void setSendPort (const int &port)
 
virtual void setBundling (int maxBundleSize, bool enableUnbundling, int minPacketSize, int sizeOffset, int sizeLength, bool testDisHeader)
 Set all bundling parameters Disables bundling if max. More...
 
virtual void setBundling (int maxBundleSize)
 Call through to DtSocket::setBundling to prevent compiler warnings. More...
 
virtual void setUnbundling (int onOff)
 Pass 0 to setUnbundling to turn unbundling off, 1 to turn it on. More...
 
virtual int isUnbundling ()
 Set all bundling parameters Disables bundling if max. More...
 
virtual int minPacketSize ()
 
virtual void setMinPacketSize (int size)
 
virtual int sizeOffset ()
 
virtual void setSizeOffset (int offset)
 
virtual int sizeLength ()
 
virtual void setSizeLength (int length)
 
virtual bool testDisHeader ()
 
virtual void enableDisHeaderTest (bool shouldTest)
 
virtual int listenToMulticastGroup (DtIpv4Addr multicastAddr, DtIpv4Addr netInterface=DtUSE_DEFAULT_IP_ADDR)
 
virtual int dropMulticastGroup (DtIpv4Addr multicastAddr, DtIpv4Addr netInterface=DtUSE_DEFAULT_IP_ADDR)
 
virtual void setMcastDevice (DtIpv4Addr devAddr)
 
virtual DtIpv4Addr mcastDevice () const
 
- Public Member Functions inherited from DtSocket
 DtSocket ()
 Default constructor. More...
 
virtual ~DtSocket ()
 Default Destructor. More...
 
caddr_t DtRecv ()
 
virtual DtFlushStatus flush ()
 Send buffered messages. More...
 
virtual DtFlushStatus flush (long &byteCount)
 Send buffered messages. More...
 
virtual void setReceiveBufferSize (int newsize)
 Change the socket's receive buffer size that the OS uses to collect incoming data from the network. More...
 
virtual void setSendBufferSize (int newsize)
 Change the socket's send buffer size that the OS uses when writing data to the network. More...
 
virtual int isBundling ()
 
virtual int DtReportPktsRcvd (void)
 
virtual void notifyMe ()
 
virtual DtFilterTestexerciseId ()
 
virtual DtFilterTestprotocolVersion ()
 
virtual DtFilterTestpduKind ()
 
virtual DtFilterTestipAddr ()
 

Protected Member Functions

DtListItemfindItem (DtIpv4Addr addr) const
 
 DtGroupSocket (const DtGroupSocket &)
 Copy CTOR Not implemented. More...
 
DtGroupSocketoperator= (const DtGroupSocket &)
 Assignment operator not implemented. More...
 
- Protected Member Functions inherited from DtNetSocket
void init (int port, DtIpv4Addr dest_addr, DtU8 flags, DtIpv4Addr devAddr=0)
 Called from all constructors. More...
 
virtual int dataLeftInCurrentBundle ()
 Is there still data left in the last received packet? More...
 
virtual int retrySendTo (caddr_t packet, size_t size, sockaddr_in &dest)
 If retry is enabled, retry failed packet send theMaxSendRetries times. More...
 
virtual int recvWithStatus (caddr_t *buffptr, int *status)
 Sets buffptr to point to the next packet (might be next in bundle, might require a read from net) and returns size. More...
 
virtual int recvFromNet (caddr_t *buffptr)
 Grabs the next packet from the network, and puts it into myPktBuff. More...
 
virtual int recvWithUnbundling (caddr_t *buffptr)
 Used by recvWithStatus if unbundling is on. More...
 
int initSocket ()
 Initialize the socket. More...
 
int initWrite (DtIpv4Addr dest)
 Initialize for writing. More...
 
int initRead (DtIpv4Addr dest)
 Initialize for reading, including performing bind. More...
 
virtual int privateListenToMulticastGroup (DtIpv4Addr multicastAddr, int on_init=0, DtIpv4Addr netInterface=DtUSE_DEFAULT_IP_ADDR)
 Helper function for listenToMulticastGroup. More...
 
virtual void findNextPacket ()
 Sets myNextPacket to point to the next packet. More...
 
virtual unsigned int getNextPacketSize ()
 Gets the size of the next packet pointed to by myNextPacket. More...
 
virtual unsigned int currentHeaderMatchesFirstInBundle ()
 DIS-specific function to help decide if unbundling is successful. More...
 
 DtNetSocket (const DtNetSocket &)
 Not Implemented. More...
 
DtNetSocketoperator= (const DtNetSocket &)
 Not Implemented. More...
 
- Protected Member Functions inherited from DtSocket
virtual bool accept (char *buf, DtIpv4Addr iaddr)
 

Protected Attributes

DtList myRemoteSites
 DtList of DtInetAddrs (which do not need to be deleted). More...
 
- Protected Attributes inherited from DtNetSocket
int myUdpPort
 
int myFilterPort
 
int mySendPort
 
unsigned int mySourcePort
 
char * myPktBuff
 
char * myUnbundleBuff
 
void * myNextPacket
 
int myUsingExternalSocket
 
DtIpv4Addr myExtSockAddr
 
DtIpv4Addr myDestInetAddr
 
DtIpv4Addr myDevAddr
 
int myUnbundling
 
int sizeLeft
 
int myPktMinSize
 
int myPktSizeOffset
 
int myPktSizeLength
 
int myMaxPacketSize
 
bool myTestingDisHeader
 
int boundToDestAddr
 
int firstInBundle
 
int firstExId
 
int firstProtocol
 
bool myOkFlag
 
sockaddr_in * destSockAddr
 
sockaddr_in * sourceSockAddr
 
DtU8 myFlags
 
- Protected Attributes inherited from DtSocket
BufferMap myBufferMap
 
int myBundlingFlag
 
int myMaxBundleSize
 
int mySockFd
 

Additional Inherited Members

- Static Public Member Functions inherited from DtNetSocket
static int isMulticastAddr (DtIpv4Addr addr)
 Returns 1 if addr is a multicast address, 0 otherwise. More...
 
static int enableBroadcast (int sockfd)
 Make sockfd capable of broadcasting. More...
 
static void makeNonBlocking (int sockfd)
 Make sockfd non-blocking. More...
 
static int makeReusable (int sockfd)
 Make port/address reusable by other sockets. More...
 
static void setRetryOnSend (unsigned int numRetries, double waitPeriod)
 Make socket retry numRetries times ( waiting for waitPeriod between ) when sendto fails ( numRetries = 0 means message will be dropped ) More...
 
static DtIpv4Addr inetBroadcastOfDevice (const char *device=NULL)
 Obtain information about a device. More...
 
static DtIpv4Addr inetAddrOfDevice (const char *device=NULL)
 
static DtIpv4Addr netMaskOfDevice (const char *device=NULL)
 
static DtIpv4Addr firstHostInetAddr ()
 
static void setInetAddr (sockaddr_in &s, u_long addr, int port)
 Fill out a sockaddr_in structure. More...
 
- Static Public Member Functions inherited from DtSocket
static void initializeNetwork ()
 
static void setQuietSockets (bool quietVal)
 These functions determine whether a socket will print messages, informative or error. More...
 
static bool areQuietSockets ()
 
- Public Attributes inherited from DtSocket
int myBlockingFlag
 
int pkts_rcvd
 
- Static Public Attributes inherited from DtNetSocket
static DtInitErrorAction initErrorAction
 
- Protected Types inherited from DtSocket
typedef std::vector< char > Buffer
 
typedef std::map< DtIpv4Addr,
Buffer
BufferMap
 
- Static Protected Member Functions inherited from DtNetSocket
static ifreq * findIfr (const char *device, int sock, ifconf *ifc)
 Find a device. More...
 
static DtIpv4Addr netMaskOfIfr (ifreq *ifr, int sock)
 Obtain information about a device. Dummy socket needed for ioctls. More...
 
static DtIpv4Addr inetAddrOfIfr (ifreq *ifr, int sock)
 
static DtIpv4Addr inetBroadcastOfIfr (ifreq *ifr, int sock)
 
static bool capableOfIpBroadcast (ifreq *ifr, int sock)
 
- Static Protected Member Functions inherited from DtSocket
static int getConfig (const char *device, int sock, ifconf *ifc)
 Get ifconfig information by filling in ifc. More...
 
- Static Protected Attributes inherited from DtNetSocket
static unsigned int theMaxSendRetries
 
static double theSendRetryPeriod
 
- Static Protected Attributes inherited from DtSocket
static bool theAreQuietSockets
 Should a socket print messages, informative or error. More...
 

Detailed Description

Deprecated:
This class has been replaced by DtInetSocketMgr as of VR-Link 3.13

Constructor & Destructor Documentation

DtGroupSocket::DtGroupSocket ( int  port = DtDEFAULT_PORT,
DtU8  flags = DtReadWrite,
DtIpv4Addr  devAddr = 0 
)

Constructor - uses default address for listening.

Will not send to any addresses until addRemoteSite is called.

DtGroupSocket::DtGroupSocket ( int  port,
DtIpv4Addr  addr,
DtU8  flags,
DtIpv4Addr  devAddr = 0 
)

Constructor - uses addr for listening.

Will not send to any addresses until addRemoteSite is called.

virtual DtGroupSocket::~DtGroupSocket ( )
virtual

Destructor.

DtGroupSocket::DtGroupSocket ( const DtGroupSocket )
protected

Copy CTOR Not implemented.

Member Function Documentation

virtual void DtGroupSocket::addRemoteSite ( DtIpv4Addr  addr)
virtual

Add/remove a remote site to send to.

virtual int DtGroupSocket::DtSend ( caddr_t  pkt,
size_t  size,
DtIpv4Addr  addr 
)
virtual

Virtual function override - send to all remote sites.

Reimplemented from DtSocket.

DtListItem* DtGroupSocket::findItem ( DtIpv4Addr  addr) const
protected
DtGroupSocket& DtGroupSocket::operator= ( const DtGroupSocket )
protected

Assignment operator not implemented.

const DtList * DtGroupSocket::remoteSitesList ( ) const
inlinevirtual

Return the remote sites list.

virtual void DtGroupSocket::removeAllRemoteSites ( )
virtual

Clear the list of remote sites.

virtual void DtGroupSocket::removeRemoteSite ( DtIpv4Addr  addr)
virtual
virtual int DtGroupSocket::sendToAllRemoteSites ( caddr_t  pkt,
size_t  size,
DtIpv4Addr  dwSkipAddr = 0 
)
virtual

Send to all remote sites except dwSkipAddr.

Member Data Documentation

DtList DtGroupSocket::myRemoteSites
protected

DtList of DtInetAddrs (which do not need to be deleted).


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

Document ID: Generated on Thu Sep 19 02:12:35 EDT 2024 from SVN revision 269601
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)