TCP socket-based RPC server.
More...
#include <socket_rpc_server.h>
|
| SocketRpcServer (AsyncBsdSocketLib::Poller *poller, std::string ipAddress, uint16_t port, uint8_t protocolVersion, uint8_t interfaceVersion=1) |
| Constructor. More...
|
|
| RpcServer (const RpcServer &)=delete |
|
void | SetHandler (uint16_t serviceId, uint16_t methodId, HandlerType handler) |
| Set a RPC request handler. More...
|
|
|
using | HandlerType = std::function< bool(const std::vector< uint8_t > &, std::vector< uint8_t > &)> |
| SOME/IP RPC request handler type.
|
|
| RpcServer (uint8_t protocolVersion, uint8_t interfaceVersion) noexcept |
| Constructor. More...
|
|
bool | TryInvokeHandler (const std::vector< uint8_t > &requestPayload, std::vector< uint8_t > &responsePayload) const |
| Try to invoke corresponding request handler at a message reception. More...
|
|
TCP socket-based RPC server.
◆ SocketRpcServer()
ara::com::someip::rpc::SocketRpcServer::SocketRpcServer |
( |
AsyncBsdSocketLib::Poller * |
poller, |
|
|
std::string |
ipAddress, |
|
|
uint16_t |
port, |
|
|
uint8_t |
protocolVersion, |
|
|
uint8_t |
interfaceVersion = 1 |
|
) |
| |
Constructor.
- Parameters
-
poller | BSD sockets poller |
ipAddress | RPC server IP address |
port | RPC server listening TCP port number |
protocolVersion | SOME/IP protocol header version |
interfaceVersion | Service interface version |
- Exceptions
-
std::runtime_error | Throws when the TCP server socket configuration failed |