eRPC
Classes | Public Member Functions | List of all members
erpc::Nexus Class Reference

A per-process library object used for initializing eRPC. More...

#include <nexus.h>

Public Member Functions

 Nexus (std::string local_uri, size_t numa_node=0, size_t num_bg_threads=0)
 Initialize eRPC for this process. More...
 
int register_req_func (uint8_t req_type, erpc_req_func_t req_func, ReqFuncType req_func_type=ReqFuncType::kForeground)
 Register application-defined request handler function. This must be done before any Rpc registers a hook with the Nexus. More...
 

Detailed Description

A per-process library object used for initializing eRPC.

Constructor & Destructor Documentation

◆ Nexus()

erpc::Nexus::Nexus ( std::string  local_uri,
size_t  numa_node = 0,
size_t  num_bg_threads = 0 
)

Initialize eRPC for this process.

Parameters
local_uriA URI for this process formatted as hostname:udp_port. This UDP port is used for listening to management packets, and it must be in [kBaseSmUdpPort, kBaseSmUdpPort + kMaxNumERpcProcesses).
numa_nodeThe NUMA node used by eRPC for this process
num_bg_threadsThe number of background RPC request processing threads to launch.
Exceptions
runtime_errorif Nexus creation fails.

Member Function Documentation

◆ register_req_func()

int erpc::Nexus::register_req_func ( uint8_t  req_type,
erpc_req_func_t  req_func,
ReqFuncType  req_func_type = ReqFuncType::kForeground 
)

Register application-defined request handler function. This must be done before any Rpc registers a hook with the Nexus.

Returns
0 on success, negative errno on failure.

The documentation for this class was generated from the following file: