|
join 1.0
lightweight network framework library
|
basic stream acceptor class. More...
#include <acceptor.hpp>


Public Types | |
| using | Endpoint = typename Protocol::Endpoint |
| using | Socket = typename Protocol::Socket |
| using | Stream = typename Protocol::Stream |
Public Member Functions | |
| BasicStreamAcceptor ()=default | |
| create the acceptor instance. | |
| BasicStreamAcceptor (const BasicStreamAcceptor &other)=delete | |
| copy constructor. | |
| BasicStreamAcceptor & | operator= (const BasicStreamAcceptor &other)=delete |
| copy assignment operator. | |
| BasicStreamAcceptor (BasicStreamAcceptor &&other) | |
| move constructor. | |
| BasicStreamAcceptor & | operator= (BasicStreamAcceptor &&other) |
| move assignment operator. | |
| virtual | ~BasicStreamAcceptor () |
| destroy instance. | |
| virtual int | create (const Endpoint &endpoint) noexcept |
| create acceptor | |
| virtual void | close () noexcept |
| close acceptor. | |
| virtual Socket | accept () const |
| accept new connection and fill in the client object with connection parameters. | |
| virtual Stream | acceptStream () const |
| accept new connection and fill in the client object with connection parameters. | |
| Endpoint | localEndpoint () const |
| determine the local endpoint associated with this socket. | |
| bool | opened () const noexcept |
| check if the socket is opened. | |
| int | family () const noexcept |
| get address family. | |
| int | type () const noexcept |
| get the protocol communication semantic. | |
| int | protocol () const noexcept |
| get acceptor protocol. | |
| int | handle () const noexcept override |
| get socket native handle. | |
Public Member Functions inherited from join::EventHandler | |
| EventHandler ()=default | |
| create instance. | |
| virtual | ~EventHandler ()=default |
| destroy instance. | |
Protected Attributes | |
| int | _handle = -1 |
| socket handle. | |
| Protocol | _protocol |
| protocol. | |
Additional Inherited Members | |
Protected Member Functions inherited from join::EventHandler | |
| virtual void | onReceive () |
| method called when data are ready to be read on handle. | |
| virtual void | onClose () |
| method called when handle is closed. | |
| virtual void | onError () |
| method called when an error occured on handle. | |
basic stream acceptor class.
| using join::BasicStreamAcceptor< Protocol >::Endpoint = typename Protocol::Endpoint |
| using join::BasicStreamAcceptor< Protocol >::Socket = typename Protocol::Socket |
| using join::BasicStreamAcceptor< Protocol >::Stream = typename Protocol::Stream |
|
default |
create the acceptor instance.
|
delete |
copy constructor.
| other | other object to copy. |
|
inline |
move constructor.
| other | other object to move. |
|
inlinevirtual |
destroy instance.
|
inlinevirtual |
accept new connection and fill in the client object with connection parameters.
Reimplemented in join::BasicTlsAcceptor< Protocol >.
|
inlinevirtual |
accept new connection and fill in the client object with connection parameters.
|
inlinevirtualnoexcept |
close acceptor.
|
inlinevirtualnoexcept |
create acceptor
| endpoint | endpoint to assign to the acceptor. |
|
inlinenoexcept |
get address family.
|
inlineoverridevirtualnoexcept |
|
inline |
determine the local endpoint associated with this socket.
|
inlinenoexcept |
check if the socket is opened.
|
inline |
move assignment operator.
| other | other object to assign. |
|
delete |
copy assignment operator.
| other | other object to assign. |
|
inlinenoexcept |
get acceptor protocol.
|
inlinenoexcept |
get the protocol communication semantic.
|
protected |
socket handle.
|
protected |
protocol.