9 #include <zeroeq/receiver.h> 10 #include <zeroeq/sender.h> 11 #include <zeroeq/types.h> 52 ZEROEQ_API
explicit Server(
const std::string& session);
66 ZEROEQ_API
explicit Server(
const URI& uri);
81 ZEROEQ_API
Server(
const URI& uri,
const std::string& session);
142 ZEROEQ_API
Server(
const URI& uri,
const std::string& session,
148 ZEROEQ_API
Server(Server&&);
149 ZEROEQ_API Server& operator=(Server&&);
168 ZEROEQ_API
bool remove(
const uint128_t& request);
181 ZEROEQ_API
const std::string&
getSession()
const;
185 std::unique_ptr<Impl> _impl;
187 Server(
const Server&) =
delete;
188 Server& operator=(
const Server&) =
delete;
191 void addSockets(std::vector<detail::Socket>& entries)
final;
192 bool process(detail::Socket& socket)
final;
193 void addConnection(
const std::string& uri)
final;
196 ZEROEQ_API zmq::SocketPtr getSocket()
final;
Enhances servus::URI to guarantee the existance of a schema and to allow construction of [host][:port...
Defines export visibility macros for library ZeroEQ.
Server()
Create a default server.
Serves request from one or more Client(s).
const std::string & getSession() const
std::function< ReplyData(const void *, size_t)> HandleFunc
Callback for serving a Client::request() in Server::handle().
~Server()
Destroy this server.
Base class for entities receiving data.
Publish-subscribe and request-reply.
Interface for entities sending data.
const URI & getURI() const
Get the server URI.
bool handle(const uint128_t &request, const HandleFunc &func)
Register a request handler.