11 #include <servus/serializable.h> 12 #include <servus/servus.h> 13 #include <servus/types.h> 14 #include <servus/uint128_t.h> 46 using servus::uint128_t;
53 using URIs = std::vector<URI>;
62 using ReplyFunc = std::function<void(const uint128_t&, const void*, size_t)>;
65 using ReplyData = std::pair<uint128_t, servus::Serializable::Data>;
68 using HandleFunc = std::function<ReplyData(const void*, size_t)>;
71 typedef SOCKET SocketDescriptor;
73 typedef int SocketDescriptor;
80 using servus::make_uint128;
82 static const std::string DEFAULT_SESSION(
"__zeroeq");
83 static const std::string NULL_SESSION(
"__null_session");
84 static const std::string TEST_SESSION(servus::TEST_DRIVER);
85 static const std::string ENV_PUB_SESSION(
"ZEROEQ_PUB_SESSION");
86 static const std::string ENV_REP_SESSION(
"ZEROEQ_SERVER_SESSION");
94 using ContextPtr = std::shared_ptr<void>;
95 using SocketPtr = std::shared_ptr<void>;
std::pair< uint128_t, servus::Serializable::Data > ReplyData
Return value of Server::handle() function (reply ID, reply data)
std::function< ReplyData(const void *, size_t)> HandleFunc
Callback for serving a Client::request() in Server::handle().
static const uint32_t TIMEOUT_INDEFINITE
Constant defining 'wait forever' in methods with wait parameters.
Includes compile-time defines of ZeroEQ.
std::function< void()> EventFunc
Callback for receival of subscribed event without payload.
std::vector< URI > URIs
A vector of URIs.
std::function< void(const void *, size_t)> EventPayloadFunc
Callback for receival of subscribed event with payload.
Publish-subscribe and request-reply.
std::function< void(const uint128_t &, const void *, size_t)> ReplyFunc
Callback for the reply of a Client::request() (reply ID, reply data).