Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::com::someip::rpc::SocketRpcServer Class Reference

TCP socket-based RPC server. More...

#include <socket_rpc_server.h>

Inheritance diagram for ara::com::someip::rpc::SocketRpcServer:
ara::com::someip::rpc::RpcServer

Public Member Functions

 SocketRpcServer (AsyncBsdSocketLib::Poller *poller, std::string ipAddress, uint16_t port, uint8_t protocolVersion, uint8_t interfaceVersion=1)
 Constructor. More...
 
- Public Member Functions inherited from ara::com::someip::rpc::RpcServer
 RpcServer (const RpcServer &)=delete
 
void SetHandler (uint16_t serviceId, uint16_t methodId, HandlerType handler)
 Set a RPC request handler. More...
 

Additional Inherited Members

- Public Types inherited from ara::com::someip::rpc::RpcServer
using HandlerType = std::function< bool(const std::vector< uint8_t > &, std::vector< uint8_t > &)>
 SOME/IP RPC request handler type.
 
- Protected Member Functions inherited from ara::com::someip::rpc::RpcServer
 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...
 

Detailed Description

TCP socket-based RPC server.

Constructor & Destructor Documentation

◆ 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
pollerBSD sockets poller
ipAddressRPC server IP address
portRPC server listening TCP port number
protocolVersionSOME/IP protocol header version
interfaceVersionService interface version
Exceptions
std::runtime_errorThrows when the TCP server socket configuration failed