VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vlTcpForwarder.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992, 1997 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: vlTcpForwarder.h,v $ $Revision: 1.1.6.1 $ $State: Exp $
7 *********************************************************************/
8 #ifndef vlTcpForwarder_H_
9 #define vlTcpForwarder_H_
10 
13 
14 #include <vlutil/vlMachineTypes.h>
15 #include <vlutil/vlNetTypes.h>
16 #include <vlutil/vlUtil.h>
17 
18 #include "vlSocket.h"
19 #include "vlTcpSocketMgr.h"
20 
21 #ifdef DtUSE_UTILITIES_NAMESPACE
22 namespace DtUSE_UTILITIES_NAMESPACE
23 {
24 #endif
25 
26 
27 class DtClock;
28 
30 {
31 public:
33 
39  DtTcpForwarder(DtSocketCreationCallback cb, void* socketCreator, int port=DtDEFAULT_PORT);
40 
41  virtual ~DtTcpForwarder();
42 
43  virtual void sendToAll(caddr_t packet, size_t size);
44 
45  virtual void readAndForward(
46  DtTime maxTimeOverAll, DtTime maxTimePerSocket);
47 
50  virtual void readAndForward(DtTcpSocket* sock, DtTime stopTime);
51 
52  virtual DtTcpSocketMgr* socketMgr();
53 
57  virtual int sizeLength();
58  virtual int sizeOffset();
59  virtual void setSizeLength(int offset);
60  virtual void setSizeOffset(int length);
61 
62 protected:
63 
68 
71 };
72 
74 {
75  return mySocketMgr->sizeLength();
76 }
77 
79 {
80  return mySocketMgr->sizeOffset();
81 }
82 
83 #ifdef DtUSE_UTILITIES_NAMESPACE
84 }
85 #endif
86 
87 
88 #endif
An implementation of DtSocket which uses a TCP connection.
Definition: vlTcpSocket.h:47
Definition: vlTcpForwarder.h:29
virtual int sizeLength()
Sets TcpSockManager&#39;s offset and length so that it can create sockets whose lengthOffset and lengthSi...
Definition: vlTcpForwarder.h:73
Used to set and maintain time in a simulation.
Definition: vlTime.h:25
DtSocket *(* DtSocketCreationCallback)(void *creator, DtTcpSocketMgr *mgr)
Specialized socket creation callback signature.
Definition: vlTcpSocketMgr.h:33
DtListItem * myBeginItem
Definition: vlTcpForwarder.h:66
#define DtDEFAULT_PORT
Definition: vlSocket.h:49
DtTcpSocketMgr * mySocketMgr
Definition: vlTcpForwarder.h:64
virtual int sizeOffset()
Definition: vlTcpForwarder.h:78
This file contains the declaration of DtTcpSocketMgr.
DtList is deprecated, please use std::list&lt;T&gt;.
Definition: vlList.h:71
This file declares DtSocket as well as several useful constents and helper classes.
DtTcpSocket * myBeginSocket
Definition: vlTcpForwarder.h:65
DtClock myClock
Definition: vlTcpForwarder.h:67
#define DT_DLL_NETCOMPAT
Definition: vlMachineTypes.h:111
lint -e266
Definition: vlList.h:25
provides basic Operating Independent Methods useful to a federate
const DtList * mySockList
Pointer to the socket manager&#39;s list.
Definition: vlTcpForwarder.h:70
This file contains typedefs for machine dependant types.
Definition: vlTcpSocketMgr.h:37

Document ID: Generated on Wed Mar 27 02:04:30 EDT 2024 from SVN revision 264570
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)