MADARA  3.1.8
ZMQTransport.h
Go to the documentation of this file.
1 #ifndef _MADARA_ZEROMQ_TRANSPORT_H_
2 #define _MADARA_ZEROMQ_TRANSPORT_H_
3 
12 #include <string>
13 
14 #include "madara/MADARA_export.h"
19 
20 #include <zmq.h>
21 
26 
27 namespace madara
28 {
29  namespace transport
30  {
43  class MADARA_Export ZMQTransport : public Base
44  {
45  public:
53  ZMQTransport (const std::string & id,
55  TransportSettings & config, bool launch_transport);
56 
60  virtual ~ZMQTransport ();
61 
67  long send_data (const madara::knowledge::KnowledgeRecords & updates);
68 
72  void close (void);
73 
78  int reliability (void) const;
79 
84  int reliability (const int & setting);
85 
90  int setup (void);
91 
92  private:
93 
96 
99 
102  };
103  }
104 }
105 
106 #endif // _MADARA_ZEROMQ_TRANSPORT_H_
This class stores variables and their values for use by any entity needing state information in a thr...
Holds basic transport settings.
void * write_socket_
underlying socket for sending
Definition: ZMQTransport.h:101
This class provides a distributed knowledge base to users.
Definition: KnowledgeBase.h:44
::std::map< std::string, KnowledgeRecord * > KnowledgeRecords
knowledge::KnowledgeBase knowledge_
knowledge base for threads to use
Definition: ZMQTransport.h:95
ZMQ-based transport for knowledge.
Definition: ZMQTransport.h:43
static constexpr struct madara::knowledge::tags::string_t string
Starts threads with first class support of MADARA contexts.
Definition: Threader.h:35
threads::Threader read_threads_
threads for reading knowledge updates
Definition: ZMQTransport.h:98
Copyright (c) 2015 Carnegie Mellon University.
Base class from which all transports must be derived.
Definition: Transport.h:62