79 std::string
error()
const;
Accepts incoming TCP connections and triggers a callback for each new client.
OnNewClientCallback_t m_onNewClientCallback
Callback to handle accepted client connections.
const irsol::types::port_t m_port
Port on which to accept incoming TCP connections.
irsol::types::acceptor_t m_acceptor
TCP acceptor socket bound to m_port.
std::atomic< bool > m_running
Flag indicating whether the acceptor should continue running.
void stop()
Stops the accept loop.
bool isOpen() const
Checks if the acceptor is actively listening.
std::string error() const
Gets the current error message, if any.
void run()
Starts the accept loop.
irsol::types::connection_result_t m_isOpen
Result of attempting to bind and open the acceptor socket.
std::function< void(irsol::types::client_id_t, irsol::types::socket_t &&)> OnNewClientCallback_t
Callback function for handling new client connections.
std::string client_id_t
Represents a unique client identifier. Typically used to identify connected clients by string IDs.
sockpp::result<> connection_result_t
Result type representing success or failure of a socket operation.
uint16_t port_t
Represents a network port number. Typically used to specify TCP or UDP ports.
sockpp::tcp_socket socket_t
Alias for a TCP socket.
sockpp::tcp_acceptor acceptor_t
Alias for the TCP server socket acceptor type.
Declaration of the ClientSession class.
Core type definitions for networking, time handling, and protocol values used throughout the irsol li...