25#ifndef QB_IO_ASYNC_PROTOCOL_ACCEPT_H
26#define QB_IO_ASYNC_PROTOCOL_ACCEPT_H
28namespace qb::io::protocol {
45template <
typename _IO_,
typename _Socket>
78 return static_cast<size_t>(this->
_io.getAccepted().is_open());
93 this->
_io.on(std::move(this->
_io.getAccepted()));
Abstract base class for I/O-component-aware protocols (CRTP).
Definition protocol.h:146
_IO_ & _io
Reference to the I/O component instance that this protocol is associated with.
Definition protocol.h:166
accept()=delete
Default constructor is deleted as an I/O component reference is required.
typename _Prot::socket_type message
Definition accept.h:52
void reset() noexcept final
Resets the protocol state.
Definition accept.h:102
accept(_IO_ &io) noexcept
Constructor with I/O reference.
Definition accept.h:63
std::size_t getMessageSize() noexcept final
Checks if a new connection is available to be processed.
Definition accept.h:77
void onMessage(std::size_t) noexcept final
Processes a newly accepted connection.
Definition accept.h:92