VLink 2.0.0
A high-performance communication middleware
Loading...
Searching...
No Matches
server_impl.h File Reference

Abstract base class for all transport-specific server (RPC responder) implementations. More...

#include "./node_impl.h"
Include dependency graph for server_impl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

 Transport-agnostic base for server (RPC responder) node implementations. More...

Namespaces

Detailed Description

Abstract base class for all transport-specific server (RPC responder) implementations.

ServerImpl is the intermediate layer between the generic Server<Req,Resp> template and a concrete transport backend (e.g. DdsServerImpl, ShmServerImpl). It inherits from NodeImpl and adds method-server semantics:

  • Request listening via listen(ReqRespCallback&&) – the transport invokes the callback for each incoming RPC request, passing the request bytes and a unique req_id.
  • Asynchronous response dispatch via reply() – the application calls this after processing the request.
  • Optional client-presence query via has_clients().
Synchronous vs Asynchronous Responses
The is_sync_type flag controls whether the server uses a synchronous reply path (reply is sent inside the callback, is_sync_type = true) or an asynchronous path where the server stores the request and calls reply() later. The base reply() implementation only warns when is_sync is false and always returns false; transports that support asynchronous replies override it.