VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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>
16 
17 #include <string>
18 
19 class DtInetSocket;
20 
21 namespace makVrv
22 {
23  class DtDe;
24 
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 
72 
73  DtInetSocket* mySocket;
74  bool myOkFlag;
75  double mySendTimeout;
79  };
80 
81 
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)