170 std::unique_ptr<struct ClientImplHelper> helper_;
Versatile 128-byte byte buffer with SBO, five ownership modes and compression helpers.
定义 bytes.h:113
void update_connected()
Notifies the connection-detection subsystem that connectivity may have changed.
ClientImpl()
Protected constructor; initialises the client with kClient role.
~ClientImpl() override
Destructor.
void interrupt() override
Interrupts the client, waking any blocked wait_for_connected() or call() operation.
virtual bool wait_for_connected(std::chrono::milliseconds timeout)
Blocks until the server is reachable or the timeout elapses.
virtual bool is_connected() const =0
Returns true when the transport is connected to a server.
virtual void detect_connected(ConnectCallback &&callback)
Registers a callback to be fired when the server connection state changes.
bool is_resp_type
true when the call expects a response (vs fire-and-forget).
定义 client_impl.h:161
virtual bool call(const Bytes &req_data, MsgCallback &&callback, std::chrono::milliseconds timeout)=0
Sends a request and blocks until the response arrives or the timeout elapses.
std::function< void(bool)> ConnectCallback
Callback invoked when the peer connection state changes.
定义 node_impl.h:148
std::function< void(const Bytes &)> MsgCallback
Callback delivering a raw serialised message to a SubscriberImpl or GetterImpl.
定义 node_impl.h:177
#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.