cpp-msgpack-rpc 0.2.0
An RPC library implementing MessagePack RPC.
Loading...
Searching...
No Matches
msgpack_rpc::transport Namespace Reference

Namespace of transport of messages. More...

Namespaces

namespace  impl
 Namespace of internal implementations.
namespace  tcp
 Namespace of transport of messages via TCP.

Classes

class  Acceptor
 Class of acceptors. More...
class  BackendList
 Class of lists of backends of protocols. More...
class  BackgroundTaskStateMachine
 Class of state machines of background tasks in connections and acceptors. More...
class  Connection
 Class of connections. More...
class  ConnectionList
 Class of lists of connections. More...
class  ConnectionWrapper
 Class to wrap IConnection objects with template functions. More...
class  IAcceptor
 Interface of acceptors to accept connections. More...
class  IAcceptorFactory
 Interface of factories to create acceptors. More...
class  IBackend
 Interface of backends of protocols. More...
class  IConnection
 Interface of connections. More...
class  IConnector
 Interface of connectors to connect to endpoints of acceptors. More...

Functions

void async_connect (const BackendList &backends, const std::vector< addresses::URI > &uris, std::function< void(const Status &, std::shared_ptr< IConnection >)> on_connection)
 Asynchronously connect to an endpoint.
BackendList create_default_backend_list (const std::shared_ptr< executors::IExecutor > &executor, const config::MessageParserConfig &message_parser_config, const std::shared_ptr< logging::Logger > &logger)
 Create a list of backends with default backends of protocols.
std::shared_ptr< IBackendcreate_tcp_backend (const std::shared_ptr< executors::IExecutor > &executor, const config::MessageParserConfig &message_parser_config, std::shared_ptr< logging::Logger > logger)
 Create a backend of TCP.

Detailed Description

Namespace of transport of messages.

Function Documentation

◆ async_connect()

void msgpack_rpc::transport::async_connect ( const BackendList & backends,
const std::vector< addresses::URI > & uris,
std::function< void(const Status &, std::shared_ptr< IConnection >)> on_connection )
inline

Asynchronously connect to an endpoint.

Parameters
[in]backendsBackends.
[in]urisURIs.
[in]on_connectionCallback function called when a connection is established or error occurred in all URIs.
Warning
This class holds only reference to backends and URIs.

Definition at line 134 of file async_connect.h.

◆ create_default_backend_list()

BackendList msgpack_rpc::transport::create_default_backend_list ( const std::shared_ptr< executors::IExecutor > & executor,
const config::MessageParserConfig & message_parser_config,
const std::shared_ptr< logging::Logger > & logger )
inlinenodiscard

Create a list of backends with default backends of protocols.

Parameters
[in]executorExecutor.
[in]message_parser_configConfiguration of parsers of messages.
[in]loggerLogger.
Returns
List of backends.

Definition at line 41 of file create_default_backend_list.h.

◆ create_tcp_backend()

std::shared_ptr< IBackend > msgpack_rpc::transport::create_tcp_backend ( const std::shared_ptr< executors::IExecutor > & executor,
const config::MessageParserConfig & message_parser_config,
std::shared_ptr< logging::Logger > logger )
nodiscard

Create a backend of TCP.

Parameters
[in]executorExecutor.
[in]message_parser_configConfiguration of parsers of messages.
[in]loggerLogger.
Returns
Backend.

Definition at line 29 of file backends.cpp.