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
DtUdpMessageClient.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2017 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
9
10
#pragma once
11
12
#include <
vrvCore/vrvCore.h
>
13
#include <
vrvUtil/DtMessageClient.h
>
14
#include <
vrvUtil/DtMessageStream.h
>
15
#include <
vrvUtil/DtVirtualBaseClass.h
>
16
17
#include <string>
18
19
class
DtInetSocket;
20
21
namespace
makVrv
22
{
23
class
DtDe;
24
27
class
DT_DLL_VRVCORE
DtUdpMessageClient
:
public
DtMessageClient
28
{
29
public
:
30
33
DtUdpMessageClient
(
DtDe
& de, DtInetSocket* socket,
size_t
maxPacketSize);
34
36
virtual
~
DtUdpMessageClient
();
37
39
virtual
void
deliver(
DtMessage
& msg);
40
43
virtual
void
sendAndFlush();
44
49
virtual
void
getServerMessages(
MessageList
&);
50
52
DtInetSocket* socket()
const
;
53
55
virtual
void
readData();
56
58
bool
isOk()
const
;
59
60
size_t
maxPacketSize()
const
;
61
63
static
std::string errorString(
int
code);
64
65
protected
:
66
67
int
lastError();
68
69
protected
:
70
71
DtDe
&
myDe
;
72
73
DtInetSocket*
mySocket
;
74
bool
myOkFlag
;
75
double
mySendTimeout
;
76
DtMessageStream
myInputStream
;
77
DtMessageStream
myOutputStream
;
78
size_t
myMaxPacketSize
;
79
};
80
81
84
class
DT_DLL_VRVCORE
DtUdpMessageClientCreator
:
public
DtVirtualBaseClass
85
{
86
public
:
87
89
static
DtUdpMessageClientCreator
& instance(
DtDe
&);
90
92
static
void
registerInstance(
DtDe
& de,
DtUdpMessageClientCreator
*);
93
95
virtual
DtUdpMessageClient
* create(
DtDe
& de,
const
std::string& udpDevice,
96
const
std::string& udpAddress,
int
port );
97
};
98
99
}
100
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
)