![]() |
The UNIX domain acceptor type.
typedef basic_socket_acceptor< stream_protocol > acceptor;
Name |
Description |
---|---|
Socket option to permit sending of broadcast messages. |
|
IO control command to get the amount of data that can be read without blocking. |
|
Socket option to enable socket-level debugging. |
|
Socket option to prevent routing, use local interfaces only. |
|
Socket option to report aborted connections on accept. |
|
The endpoint type. |
|
The underlying implementation type of I/O object. |
|
Socket option to send keep-alives. |
|
Socket option to specify whether the socket lingers on close if unsent data is present. |
|
Bitmask type for flags that can be passed to send and receive operations. |
|
The native representation of an acceptor. |
|
IO control command to set the blocking mode of the socket. |
|
The protocol type. |
|
Socket option for the receive buffer size of a socket. |
|
Socket option for the receive low watermark. |
|
Socket option to allow the socket to be bound to an address that is already in use. |
|
Socket option for the send buffer size of a socket. |
|
Socket option for the send low watermark. |
|
The type of the service that will be used to provide I/O operations. |
|
Different ways a socket may be shutdown. |
Name |
Description |
---|---|
Accept a new connection. |
|
Assigns an existing native acceptor to the acceptor. |
|
Start an asynchronous accept. |
|
Construct an acceptor without opening it. |
|
Bind the acceptor to the given local endpoint. |
|
Cancel all asynchronous operations associated with the acceptor. |
|
Close the acceptor. |
|
Get the io_service associated with the object. |
|
Get an option from the acceptor. |
|
(Deprecated: use get_io_service().) Get the io_service associated with the object. |
|
Determine whether the acceptor is open. |
|
Place the acceptor into the state where it will listen for new connections. |
|
Get the local endpoint of the acceptor. |
|
Get the native acceptor representation. |
|
Open the acceptor using the specified protocol. |
|
Set an option on the acceptor. |
Name |
Description |
---|---|
The maximum length of the queue of pending incoming connections. |
|
Specify that the data should not be subject to routing. |
|
Process out-of-band data. |
|
Peek at incoming data without removing it from the input queue. |
Name |
Description |
---|---|
The underlying implementation of the I/O object. |
|
The service associated with the I/O object. |
The basic_socket_acceptor class template is used for accepting new socket connections.
Distinct objects: Safe.
Shared objects: Unsafe.
Opening a socket acceptor with the SO_REUSEADDR option enabled:
asio::ip::tcp::acceptor acceptor(io_service); asio::ip::tcp::endpoint endpoint(asio::ip::tcp::v4(), port); acceptor.open(endpoint.protocol()); acceptor.set_option(asio::ip::tcp::acceptor::reuse_address(true)); acceptor.bind(endpoint); acceptor.listen();