CppServer  1.0.0.0
C++ Server Library
bus.h
Go to the documentation of this file.
1 
9 #ifndef CPPSERVER_NANOMSG_BUS_H
10 #define CPPSERVER_NANOMSG_BUS_H
11 
12 #include "server.h"
13 
14 namespace CppServer {
15 namespace Nanomsg {
16 
18 
39 class Bus : public Server
40 {
41 public:
43 
47  explicit Bus(const std::string& address, bool threading = true)
48  : Server(CppServer::Nanomsg::Domain::Std, CppServer::Nanomsg::Protocol::Bus, address, threading)
49  {}
50  Bus(const Bus&) = delete;
51  Bus(Bus&&) = default;
52  virtual ~Bus() = default;
53 
54  Bus& operator=(const Bus&) = delete;
55  Bus& operator=(Bus&&) = default;
56 
58 
66  bool Link(const std::string& address);
67 };
68 
71 } // namespace Nanomsg
72 } // namespace CppServer
73 
74 #endif // CPPSERVER_NANOMSG_BUS_H
Nanomsg server.
Definition: server.h:29
Nanomsg bus node.
Definition: bus.h:39
C++ Server project definitions.
Definition: asio.h:24
Bus & operator=(const Bus &)=delete
virtual ~Bus()=default
Nanomsg server definition.
Protocol
Nanomsg protocol.
Definition: nanomsg.h:56
Bus(const std::string &address, bool threading=true)
Initialize bus node with a given endpoint address.
Definition: bus.h:47
Domain
Nanomsg domain.
Definition: nanomsg.h:41
Standard full-blown socket.
bool Link(const std::string &address)
Link the current bus node to another one.
Definition: bus.cpp:14