25#ifndef QB_IO_TRANSPORT_ACCEPT_H_
26#define QB_IO_TRANSPORT_ACCEPT_H_
29namespace qb::io::transport {
50 constexpr bool is_secure() const noexcept {
return false; }
76 if (_io.accept(_accepted_io) == io::SocketStatus::Done)
77 return static_cast<std::size_t
>(_accepted_io.native_handle());
78 return static_cast<std::size_t
>(-1);
90 _accepted_io.release_handle();
Class implementing a TCP listener for accepting incoming connections.
Definition listener.h:42
Class implementing TCP socket functionality for reliable, stream-oriented communication.
Definition socket.h:43
Connection acceptance transport for TCP connections.
Definition accept.h:44
void close() noexcept
Close the listener.
Definition accept.h:109
void eof() const noexcept
End-of-file handling (no-op)
Definition accept.h:100
std::size_t read() noexcept
Accept a new connection.
Definition accept.h:75
io::tcp::socket & getAccepted()
Get the accepted socket.
Definition accept.h:121
constexpr bool is_secure() const noexcept
Indicates that this transport implementation is not secure.
Definition accept.h:50
io::tcp::listener & transport() noexcept
Get the underlying TCP listener.
Definition accept.h:62
io::tcp::socket socket_type
Type of the accepted socket.
Definition accept.h:55
io::tcp::listener transport_io_type
Type of the underlying transport I/O.
Definition accept.h:52
void flush(std::size_t) noexcept
Release the accepted socket handle.
Definition accept.h:89
Implementation of a TCP listener for the QB IO library.