|
VLink 2.0.0
A high-performance communication middleware
|
Type-safe method-model server (handler side) for VLink RPC. More...
#include <functional>#include <memory>#include <string>#include "./impl/server_impl.h"#include "./node.h"#include "./internal/server-inl.h"Go to the source code of this file.
Classes | |
| class | vlink::Server< ReqT, RespT, SecT > |
| Type-safe server for the VLink method (RPC) communication model. More... | |
| class | vlink::SecurityServer< ReqT, RespT > |
Convenience alias for Server with message security enabled. More... | |
Namespaces | |
| namespace | vlink |
Type-safe method-model server (handler side) for VLink RPC.
Server<ReqT, RespT, SecT> is the handler side of the VLink method model. It registers a callback that is invoked for each incoming request and optionally fills a response.
| Method | When to use |
|---|---|
listen(ReqCallback) | Fire-and-forget. |
listen(ReqRespCallback) | Synchronous reply inside the callback. |
listen_for_reply(ReqAsyncRespCallback) | Async reply via reply(). |
listen() / listen_for_reply() more than once is fatal. reply() must only be called after listen_for_reply(); calling it after a synchronous listen() triggers a fatal log.| ReqT | Request message type. Must satisfy Serializer::is_supported(). |
| RespT | Response message type. Defaults to Traits::EmptyType (no response). |
| SecT | Security mode; defaults to SecurityType::kWithoutSecurity. |