VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtTcpMessageClient.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtTcpMessageClient.h,v $ $Revision: 1.20 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtRemoteIGITCPClient_H_
14 #define DtRemoteIGITCPClient_H_
15 
16 #include <vrvCore/vrvCore.h>
19 #include <vrvCore/DtDeRecord.h>
20 
21 #include <string>
22 
23 namespace makVrv
24 {
25  class DtDe;
26 
30  {
31  public:
32 
34  DtTcpMessageClient( DtDe& de,int socket, const std::string& localAddress, int port,
35  bool useBlockingSend=false);
36 
38  virtual ~DtTcpMessageClient();
39 
41  virtual void deliver(DtMessage& msg);
42 
45  void sendAndFlush();
46 
48  virtual void getServerMessages(MessageList&);
49 
51  void connectToListener(const std::string& address,int port);
52 
54  void disconnect();
55 
59  virtual bool validateConnection();
60 
62  virtual bool isConnected() const;
63 
65  int socket() const;
66 
68  virtual int port() const;
69 
71  const std::string& address() const;
72 
74  void readData();
75 
77  bool isOk() const;
78 
80  static void getUniqueClientName(std::string& nameOut);
81 
83  virtual const std::string& name() const;
84 
86  static std::string errorString(int code);
87 
89  const DtDeRecord& connectionRecord();
90 
91  double sendTimeout() const;
92 
93  protected:
94 
95  void setSocket(int socket);
96 
99  bool receiveIgRecord(DtDeRecord& name);
100 
102  bool receiveString(std::string& string);
104  bool receiveInt( int& value);
105  bool sendString( const std::string& name );
106  bool sendInt( int value);
108 
111  bool sendIGRecord(const DtDeRecord& record);
112 
113 
114  int lastError();
115 
117  void getMessagesFromData();
118 
120 
121  int mySocket;
122  std::string myAddress;
123  int myPort;
124  bool myOkFlag;
126 
127 
132 
133  };
134 }
135 
136 #endif
DtDeRecord myRecord
Definition: DtTcpMessageClient.h:130
bool myOkFlag
Definition: DtTcpMessageClient.h:124
Contains makVrv::DtDeRecord class.
The IGI Message.
Definition: DtMessage.h:33
Class for serializing objects as a byte stream for transmitting to othe rdisplay engines.
Definition: DtMessageStream.h:25
A remote TCP client that the TCP server communicates with.
Definition: DtTcpMessageClient.h:29
DtMessageStream myOutputStream
Definition: DtTcpMessageClient.h:129
A Record of an IG instance.
Definition: DtDeRecord.h:24
Contains makVrv:DtMessageStream class.
bool myUseBlockingSend
Definition: DtTcpMessageClient.h:131
int myPort
Definition: DtTcpMessageClient.h:123
std::vector< DtMessage * > MessageList
Definition: DtMessageClient.h:45
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
std::string myAddress
Definition: DtTcpMessageClient.h:122
int mySocket
Definition: DtTcpMessageClient.h:121
double mySendTimeout
Definition: DtTcpMessageClient.h:125
IGI Client is responsible for delivering IGI messages to other remote managers.
Definition: DtMessageClient.h:30
Contains DtIGIClient class.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
DtMessageStream myInputStream
Definition: DtTcpMessageClient.h:128
DtDe & myDe
Definition: DtTcpMessageClient.h:119
Contains DLL export macros.

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)