VR-Forces 4.6 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrvCore
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
>
17
#include <
vrvUtil/DtMessageClient.h
>
18
#include <
vrvUtil/DtMessageStream.h
>
19
#include <
vrvCore/DtDeRecord.h
>
20
21
#include <string>
22
23
namespace
makVrv
24
{
25
class
DtDe;
26
29
class
DT_DLL_VRVCORE
DtTcpMessageClient
:
public
DtMessageClient
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
103
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
119
DtDe
&
myDe
;
120
121
int
mySocket
;
122
std::string
myAddress
;
123
int
myPort
;
124
bool
myOkFlag
;
125
double
mySendTimeout
;
126
127
128
DtMessageStream
myInputStream
;
129
DtMessageStream
myOutputStream
;
130
DtDeRecord
myRecord
;
131
bool
myUseBlockingSend
;
132
133
};
134
}
135
136
#endif
Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (
www.mak.com
)