MADARA  3.2.3
MulticastTransport.h
Go to the documentation of this file.
1 #ifndef _MADARA_MULTICAST_TRANSPORT_H_
2 #define _MADARA_MULTICAST_TRANSPORT_H_
3 
12 #include <string>
13 
14 #include "madara/MadaraExport.h"
23 #include "madara/Boost.h"
26 
27 namespace madara
28 {
29  namespace transport
30  {
31  namespace asio = boost::asio;
32  namespace ip = boost::asio::ip;
33  using udp = boost::asio::ip::udp;
34 
47  class MADARA_EXPORT MulticastTransport : public UdpTransport
48  {
49  public:
57  MulticastTransport (const std::string & id,
59  TransportSettings & config, bool launch_transport);
60 
61  protected:
62  int setup_read_socket () override;
63  int setup_write_socket () override;
64  int setup_read_thread (double hertz, const std::string &name) override;
65 
66  bool pre_send_buffer (size_t addr_index) override { return addr_index == 0; }
67  };
68  }
69 }
70 
71 #endif // _MADARA_MULTICAST_TRANSPORT_H_
Multicast-based transport for knowledge.
This class stores variables and their values for use by any entity needing state information in a thr...
bool pre_send_buffer(size_t addr_index) override
Holds basic transport settings.
static struct madara::knowledge::tags::string_t string
Copyright (c) 2015 Carnegie Mellon University.
UDP-based transport for knowledge.
Definition: UdpTransport.h:37
boost::asio::ip::udp udp