OpenDaVINCI  4.15.3
discoverer/Server.h
Go to the documentation of this file.
1 
20 #ifndef OPENDAVINCI_DMCP_DISCOVER_SERVER_H_
21 #define OPENDAVINCI_DMCP_DISCOVER_SERVER_H_
22 
23 #include <string>
24 #include <vector>
25 
27 #include <memory>
31 #include "opendavinci/generated/odcore/data/dmcp/ServerInformation.h"
32 
33 namespace odcore {
34  namespace dmcp {
35  namespace discoverer {
36 
37  using namespace std;
38 
40  private:
46  Server(const Server &);
47 
53  Server& operator=(const Server &);
54 
55  public:
56  Server(const odcore::data::dmcp::ServerInformation &serverInformation,
57  const std::string &group, const uint32_t &serverPort, const uint32_t &clientPort,
58  const vector<string> &modulesToIgnore);
59  virtual ~Server();
60 
61  void startResponding();
62  void stopResponding();
63 
64  virtual void onRequest();
65 
66  protected:
67  virtual void nextString(const string &s);
68 
69  void sendResponseMessage(const string &s);
70 
71  std::shared_ptr<odcore::io::udp::UDPSender> m_sender;
72  std::shared_ptr<odcore::io::udp::UDPReceiver> m_receiver;
73 
74  odcore::data::dmcp::ServerInformation m_serverInformation;
75 
76  vector<string> m_modulesToIgnore;
77  };
78  }
79  }
80 }
81 #endif // OPENDAVINCI_DMCP_DISCOVER_SERVER_H_
std::shared_ptr< odcore::io::udp::UDPSender > m_sender
Definition: discoverer/Server.h:71
odcore::data::dmcp::ServerInformation m_serverInformation
Definition: discoverer/Server.h:74
#define OPENDAVINCI_API
Definition: opendavinci.h:67
vector< string > m_modulesToIgnore
Definition: discoverer/Server.h:76
std::shared_ptr< odcore::io::udp::UDPReceiver > m_receiver
Definition: discoverer/Server.h:72
Definition: StringListener.h:36
Definition: discoverer/Server.h:39