VLink  2.0.0
A high-performance communication middleware
client_impl.h File Reference

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

#include <chrono>
#include <memory>
#include "./node_impl.h"
Include dependency graph for client_impl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

Namespaces

 

Detailed Description

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.