cpp-msgpack-rpc 0.2.0
An RPC library implementing MessagePack RPC.
Loading...
Searching...
No Matches
msgpack_rpc::transport::IConnector Class Referenceabstract

Interface of connectors to connect to endpoints of acceptors. More...

#include <msgpack_rpc/transport/i_connector.h>

Inheritance diagram for msgpack_rpc::transport::IConnector:
Collaboration diagram for msgpack_rpc::transport::IConnector:

Public Types

using ConnectionCallback
 Type of callback functions called when connecting process finished (even for failures).

Public Member Functions

 IConnector (const IConnector &)=delete
 IConnector (IConnector &&)=delete
virtual ~IConnector () noexcept=default
 Destructor.
virtual void async_connect (const addresses::URI &uri, ConnectionCallback on_connected)=0
 Asynchronously connect to an endpoint.
IConnectoroperator= (const IConnector &)=delete
IConnectoroperator= (IConnector &&)=delete

Protected Member Functions

 IConnector () noexcept=default
 Constructor.

Detailed Description

Interface of connectors to connect to endpoints of acceptors.

Definition at line 34 of file i_connector.h.

Member Typedef Documentation

◆ ConnectionCallback

Initial value:
std::function<void(const Status&, std::shared_ptr<IConnection>)>
Class of statuses.
Definition status.h:34

Type of callback functions called when connecting process finished (even for failures).

Parameters:

  1. Status.
  2. Connection. (Null for failure.)

Definition at line 45 of file i_connector.h.

Member Function Documentation

◆ async_connect()

virtual void msgpack_rpc::transport::IConnector::async_connect ( const addresses::URI & uri,
ConnectionCallback on_connected )
pure virtual

Asynchronously connect to an endpoint.

Parameters
[in]uriURI of the endpoint.
[in]on_connectedCallback function called when the process finished.

Implemented in msgpack_rpc::transport::tcp::TCPConnector.


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