boost::corosio::tcp_acceptor::listen

Open, bind, and listen on an endpoint.

Synopsis

void
listen(
    endpoint ep,
    int backlog = 128);

Description

Creates an IPv4 TCP socket, binds it to the specified endpoint, and begins listening for incoming connections. This must be called before initiating accept operations.

Exceptions

Name

Thrown on

std::system_error

on failure.

Parameters

Name Description

ep

The local endpoint to bind to. Use endpoint(port) to bind to all interfaces on a specific port.

backlog

The maximum length of the queue of pending connections. Defaults to a reasonable system value.

Created with MrDocs