VLink 2.0.0
A high-performance communication middleware
载入中...
搜索中...
未找到
server_impl.h 文件参考

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

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

浏览该文件的源代码.

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

命名空间

详细描述

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.