cpp-msgpack-rpc 0.2.0
An RPC library implementing MessagePack RPC.
|
Interface of acceptors to accept connections. More...
#include <msgpack_rpc/transport/i_acceptor.h>
Public Types | |
using | ConnectionCallback |
Type of callback functions called when a connection is accepted. |
Public Member Functions | |
IAcceptor (const IAcceptor &)=delete | |
IAcceptor (IAcceptor &&)=delete | |
virtual | ~IAcceptor () noexcept=default |
Destructor. | |
virtual const addresses::IAddress & | local_address () const noexcept=0 |
Get the address of the local endpoint. | |
IAcceptor & | operator= (const IAcceptor &)=delete |
IAcceptor & | operator= (IAcceptor &&)=delete |
virtual void | start (ConnectionCallback on_connection)=0 |
Start process of this acceptor. | |
virtual void | stop ()=0 |
Stop this acceptor. |
Protected Member Functions | |
IAcceptor () noexcept=default | |
Constructor. |
Interface of acceptors to accept connections.
Definition at line 33 of file i_acceptor.h.
Type of callback functions called when a connection is accepted.
Parameters:
Definition at line 42 of file i_acceptor.h.
|
nodiscardpure virtualnoexcept |
Get the address of the local endpoint.
Implemented in msgpack_rpc::transport::Acceptor< AsioAcceptorType, AsioSocketType, ConcreteAddressType >, and msgpack_rpc::transport::Acceptor< asio::ip::tcp::acceptor, asio::ip::tcp::socket, addresses::TCPAddress >.
|
pure virtual |
Start process of this acceptor.
[in] | on_connection | Callback function called when a connection is accepted. |
Implemented in msgpack_rpc::transport::Acceptor< AsioAcceptorType, AsioSocketType, ConcreteAddressType >, and msgpack_rpc::transport::Acceptor< asio::ip::tcp::acceptor, asio::ip::tcp::socket, addresses::TCPAddress >.
|
pure virtual |