VLink  2.0.0
A high-performance communication middleware
client_impl.h 文件参考

Transport-neutral backbone shared by every method-model client implementation. 更多...

#include <chrono>
#include <memory>
#include "./node_impl.h"
client_impl.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

class  vlink::ClientImpl
 Connection-aware base class for method-model client implementations. 更多...
 

命名空间

 

详细描述

Transport-neutral backbone shared by every method-model client implementation.

This is an internal implementation header used by the public Client template; application code should depend on client.h instead. ClientImpl extends NodeImpl with the connectivity bookkeeping that lets a client wait for its counterpart server and issue blocking calls. Concrete transports such as DdsClientImpl or ShmClientImpl derive from this class and implement the pure virtual is_connected() and call() entry points.

ImplType
The constructor stamps impl_type with kClient. The base NodeImpl surfaces this value to discovery, bag, and proxy layers so they can route status callbacks correctly.
Role table
Concern Owner in this hierarchy
Wire send / receive Transport subclass (e.g. DdsClientImpl)
Connection detection ClientImpl (helper condition variable)
Blocking call timing ClientImpl + AckManager in subclass
Connect callback fan ClientImpl::detect_connected()
Internal API contract
Method Provided by Notes
is_connected() const Subclass override Queries the live transport handle.
call(req, cb, timeout) Subclass override Performs the blocking round-trip.
update_connected() This class Invoked from discovery threads on state change.
detect_connected(cb) This class Stores the user callback and primes it.
wait_for_connected(t) This class Sleeps on the helper condition variable.
interrupt() This class Wakes waiters when the node is being shut down.
Internal Notes
is_resp_type captures whether the public Client template expects a response payload; backends that implement fire-and-forget RPC flavours may read it to skip the response wait.