VR-Forces 4.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
vrvCore
DtTcpMessageClient.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2010 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
37
~
DtTcpMessageClient
();
38
40
virtual
void
deliver(
DtMessage
& msg);
41
44
void
sendAndFlush();
45
47
virtual
void
getServerMessages(
MessageList
&);
48
50
void
connectToListener(
const
std::string& address,
int
port);
51
53
void
disconnect();
54
58
virtual
bool
validateConnection();
59
61
virtual
bool
isConnected()
const
;
62
64
int
socket()
const
;
65
67
virtual
int
port()
const
;
68
70
const
std::string& address()
const
;
71
73
void
readData();
74
76
bool
isOk()
const
;
77
79
static
void
getUniqueClientName(std::string& nameOut);
80
82
virtual
const
std::string& name()
const
;
83
85
static
std::string errorString(
int
code);
86
88
const
DtDeRecord
& connectionRecord();
89
90
protected
:
91
92
void
setSocket(
int
socket);
93
96
bool
receiveIgRecord(
DtDeRecord
& name);
97
99
100
bool
receiveString(std::string&
string
);
101
bool
receiveInt(
int
& value);
102
bool
sendString(
const
std::string& name );
103
bool
sendInt(
int
value);
105
108
bool
sendIGRecord(
const
DtDeRecord
& record);
109
110
111
int
lastError();
112
114
void
getMessagesFromData();
115
116
DtDe
&
myDe
;
117
118
int
mySocket
;
119
std::string
myAddress
;
120
int
myPort
;
121
bool
myOkFlag
;
122
123
DtMessageStream
myInputStream
;
124
DtMessageStream
myOutputStream
;
125
DtDeRecord
myRecord
;
126
};
127
}
128
129
#endif
Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (
www.mak.com
)