116 virtual bool reply(uint64_t req_id,
const Bytes& resp_data,
bool is_sync);
Versatile 128-byte byte buffer with SBO, five ownership modes and compression helpers.
定义 bytes.h:113
std::function< void(uint64_t, const Bytes &, Bytes *)> ReqRespCallback
Callback for ServerImpl request/response processing.
定义 node_impl.h:170
virtual bool reply(uint64_t req_id, const Bytes &resp_data, bool is_sync)
Sends a response for a previously received request.
bool is_resp_type
true when the server sends a response (vs fire-and-forget).
定义 server_impl.h:119
virtual bool listen(ReqRespCallback &&callback)=0
Registers the request handler callback.
ServerImpl()
Protected constructor; initialises the server with kServer role.
virtual bool has_clients() const
Returns true when at least one client is currently connected.
bool is_listened
true after listen() has been successfully called.
定义 server_impl.h:118
~ServerImpl() override
Destructor.
bool is_sync_type
true when the reply is sent synchronously inside the callback.
定义 server_impl.h:120
#define VLINK_EXPORT
定义 macros.h:85
#define VLINK_DISALLOW_COPY_AND_ASSIGN(classname)
Deletes the copy constructor and copy-assignment operator of classname.
定义 macros.h:184
Abstract transport node base classes used by all VLink node implementations.