789 lines
29 KiB
HTML
789 lines
29 KiB
HTML
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title>ip::tcp::acceptor</title>
|
|
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
|
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
|
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
|
|
<link rel="up" href="../ip__tcp.html" title="ip::tcp">
|
|
<link rel="prev" href="../ip__tcp.html" title="ip::tcp">
|
|
<link rel="next" href="endpoint.html" title="ip::tcp::endpoint">
|
|
</head>
|
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
|
<table cellpadding="2" width="100%"><tr>
|
|
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
|
|
<td align="center"><a href="../../../../../index.html">Home</a></td>
|
|
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
|
|
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
|
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
|
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
|
|
</tr></table>
|
|
<hr>
|
|
<div class="spirit-nav">
|
|
<a accesskey="p" href="../ip__tcp.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ip__tcp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../boost_asio.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="endpoint.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
|
</div>
|
|
<div class="section">
|
|
<div class="titlepage"><div><div><h4 class="title">
|
|
<a name="boost_asio.reference.ip__tcp.acceptor"></a><a class="link" href="acceptor.html" title="ip::tcp::acceptor">ip::tcp::acceptor</a>
|
|
</h4></div></div></div>
|
|
<p>
|
|
<a class="indexterm" name="boost_asio.indexterm.ip__tcp.acceptor"></a>
|
|
The TCP acceptor type.
|
|
</p>
|
|
<pre class="programlisting">typedef basic_socket_acceptor< tcp > acceptor;
|
|
</pre>
|
|
<h6>
|
|
<a name="boost_asio.reference.ip__tcp.acceptor.h0"></a>
|
|
<span class="phrase"><a name="boost_asio.reference.ip__tcp.acceptor.types"></a></span><a class="link" href="acceptor.html#boost_asio.reference.ip__tcp.acceptor.types">Types</a>
|
|
</h6>
|
|
<div class="informaltable"><table class="table">
|
|
<colgroup>
|
|
<col>
|
|
<col>
|
|
</colgroup>
|
|
<thead><tr>
|
|
<th>
|
|
<p>
|
|
Name
|
|
</p>
|
|
</th>
|
|
<th>
|
|
<p>
|
|
Description
|
|
</p>
|
|
</th>
|
|
</tr></thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor__rebind_executor.html" title="basic_socket_acceptor::rebind_executor"><span class="bold"><strong>rebind_executor</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Rebinds the acceptor type to another executor.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/broadcast.html" title="basic_socket_acceptor::broadcast"><span class="bold"><strong>broadcast</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Socket option to permit sending of broadcast messages.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/bytes_readable.html" title="basic_socket_acceptor::bytes_readable"><span class="bold"><strong>bytes_readable</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
IO control command to get the amount of data that can be read
|
|
without blocking.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/debug.html" title="basic_socket_acceptor::debug"><span class="bold"><strong>debug</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Socket option to enable socket-level debugging.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/do_not_route.html" title="basic_socket_acceptor::do_not_route"><span class="bold"><strong>do_not_route</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Socket option to prevent routing, use local interfaces only.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/enable_connection_aborted.html" title="basic_socket_acceptor::enable_connection_aborted"><span class="bold"><strong>enable_connection_aborted</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Socket option to report aborted connections on accept.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/endpoint_type.html" title="basic_socket_acceptor::endpoint_type"><span class="bold"><strong>endpoint_type</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
The endpoint type.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/executor_type.html" title="basic_socket_acceptor::executor_type"><span class="bold"><strong>executor_type</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
The type of the executor associated with the object.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/keep_alive.html" title="basic_socket_acceptor::keep_alive"><span class="bold"><strong>keep_alive</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Socket option to send keep-alives.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/linger.html" title="basic_socket_acceptor::linger"><span class="bold"><strong>linger</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Socket option to specify whether the socket lingers on close
|
|
if unsent data is present.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/message_flags.html" title="basic_socket_acceptor::message_flags"><span class="bold"><strong>message_flags</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Bitmask type for flags that can be passed to send and receive
|
|
operations.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/native_handle_type.html" title="basic_socket_acceptor::native_handle_type"><span class="bold"><strong>native_handle_type</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
The native representation of an acceptor.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/out_of_band_inline.html" title="basic_socket_acceptor::out_of_band_inline"><span class="bold"><strong>out_of_band_inline</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Socket option for putting received out-of-band data inline.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/protocol_type.html" title="basic_socket_acceptor::protocol_type"><span class="bold"><strong>protocol_type</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
The protocol type.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/receive_buffer_size.html" title="basic_socket_acceptor::receive_buffer_size"><span class="bold"><strong>receive_buffer_size</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Socket option for the receive buffer size of a socket.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/receive_low_watermark.html" title="basic_socket_acceptor::receive_low_watermark"><span class="bold"><strong>receive_low_watermark</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Socket option for the receive low watermark.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/reuse_address.html" title="basic_socket_acceptor::reuse_address"><span class="bold"><strong>reuse_address</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Socket option to allow the socket to be bound to an address that
|
|
is already in use.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/send_buffer_size.html" title="basic_socket_acceptor::send_buffer_size"><span class="bold"><strong>send_buffer_size</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Socket option for the send buffer size of a socket.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/send_low_watermark.html" title="basic_socket_acceptor::send_low_watermark"><span class="bold"><strong>send_low_watermark</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Socket option for the send low watermark.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/shutdown_type.html" title="basic_socket_acceptor::shutdown_type"><span class="bold"><strong>shutdown_type</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Different ways a socket may be shutdown.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/wait_type.html" title="basic_socket_acceptor::wait_type"><span class="bold"><strong>wait_type</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Wait types.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
<h6>
|
|
<a name="boost_asio.reference.ip__tcp.acceptor.h1"></a>
|
|
<span class="phrase"><a name="boost_asio.reference.ip__tcp.acceptor.member_functions"></a></span><a class="link" href="acceptor.html#boost_asio.reference.ip__tcp.acceptor.member_functions">Member
|
|
Functions</a>
|
|
</h6>
|
|
<div class="informaltable"><table class="table">
|
|
<colgroup>
|
|
<col>
|
|
<col>
|
|
</colgroup>
|
|
<thead><tr>
|
|
<th>
|
|
<p>
|
|
Name
|
|
</p>
|
|
</th>
|
|
<th>
|
|
<p>
|
|
Description
|
|
</p>
|
|
</th>
|
|
</tr></thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/accept.html" title="basic_socket_acceptor::accept"><span class="bold"><strong>accept</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Accept a new connection. <br> <span class="silver"> —</span><br> Accept a new connection
|
|
and obtain the endpoint of the peer.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/assign.html" title="basic_socket_acceptor::assign"><span class="bold"><strong>assign</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Assigns an existing native acceptor to the acceptor.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/async_accept.html" title="basic_socket_acceptor::async_accept"><span class="bold"><strong>async_accept</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Start an asynchronous accept.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/async_wait.html" title="basic_socket_acceptor::async_wait"><span class="bold"><strong>async_wait</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Asynchronously wait for the acceptor to become ready to read,
|
|
ready to write, or to have pending error conditions.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/basic_socket_acceptor.html" title="basic_socket_acceptor::basic_socket_acceptor"><span class="bold"><strong>basic_socket_acceptor</strong></span></a> <span class="silver">[constructor]</span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Construct an acceptor without opening it. <br> <span class="silver"> —</span><br> Construct
|
|
an open acceptor. <br> <span class="silver"> —</span><br> Construct an acceptor opened
|
|
on the given endpoint. <br> <span class="silver"> —</span><br> Construct a basic_socket_acceptor
|
|
on an existing native acceptor. <br> <span class="silver"> —</span><br> Move-construct
|
|
a basic_socket_acceptor from another. <br> <span class="silver"> —</span><br> Move-construct
|
|
a basic_socket_acceptor from an acceptor of another protocol
|
|
type.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/bind.html" title="basic_socket_acceptor::bind"><span class="bold"><strong>bind</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Bind the acceptor to the given local endpoint.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/cancel.html" title="basic_socket_acceptor::cancel"><span class="bold"><strong>cancel</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Cancel all asynchronous operations associated with the acceptor.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/close.html" title="basic_socket_acceptor::close"><span class="bold"><strong>close</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Close the acceptor.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/get_executor.html" title="basic_socket_acceptor::get_executor"><span class="bold"><strong>get_executor</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Get the executor associated with the object.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/get_option.html" title="basic_socket_acceptor::get_option"><span class="bold"><strong>get_option</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Get an option from the acceptor.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/io_control.html" title="basic_socket_acceptor::io_control"><span class="bold"><strong>io_control</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Perform an IO control command on the acceptor.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/is_open.html" title="basic_socket_acceptor::is_open"><span class="bold"><strong>is_open</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Determine whether the acceptor is open.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/listen.html" title="basic_socket_acceptor::listen"><span class="bold"><strong>listen</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Place the acceptor into the state where it will listen for new
|
|
connections.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/local_endpoint.html" title="basic_socket_acceptor::local_endpoint"><span class="bold"><strong>local_endpoint</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Get the local endpoint of the acceptor.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/native_handle.html" title="basic_socket_acceptor::native_handle"><span class="bold"><strong>native_handle</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Get the native acceptor representation.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/native_non_blocking.html" title="basic_socket_acceptor::native_non_blocking"><span class="bold"><strong>native_non_blocking</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Gets the non-blocking mode of the native acceptor implementation.
|
|
<br> <span class="silver"> —</span><br> Sets the non-blocking mode of the native acceptor
|
|
implementation.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/non_blocking.html" title="basic_socket_acceptor::non_blocking"><span class="bold"><strong>non_blocking</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Gets the non-blocking mode of the acceptor. <br> <span class="silver"> —</span><br> Sets
|
|
the non-blocking mode of the acceptor.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/open.html" title="basic_socket_acceptor::open"><span class="bold"><strong>open</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Open the acceptor using the specified protocol.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/operator_eq_.html" title="basic_socket_acceptor::operator="><span class="bold"><strong>operator=</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Move-assign a basic_socket_acceptor from another. <br> <span class="silver"> —</span><br>
|
|
Move-assign a basic_socket_acceptor from an acceptor of another
|
|
protocol type.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/release.html" title="basic_socket_acceptor::release"><span class="bold"><strong>release</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Release ownership of the underlying native acceptor.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/set_option.html" title="basic_socket_acceptor::set_option"><span class="bold"><strong>set_option</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Set an option on the acceptor.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/wait.html" title="basic_socket_acceptor::wait"><span class="bold"><strong>wait</strong></span></a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Wait for the acceptor to become ready to read, ready to write,
|
|
or to have pending error conditions.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/_basic_socket_acceptor.html" title="basic_socket_acceptor::~basic_socket_acceptor"><span class="bold"><strong>~basic_socket_acceptor</strong></span></a> <span class="silver">[destructor]</span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Destroys the acceptor.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
<h6>
|
|
<a name="boost_asio.reference.ip__tcp.acceptor.h2"></a>
|
|
<span class="phrase"><a name="boost_asio.reference.ip__tcp.acceptor.data_members"></a></span><a class="link" href="acceptor.html#boost_asio.reference.ip__tcp.acceptor.data_members">Data Members</a>
|
|
</h6>
|
|
<div class="informaltable"><table class="table">
|
|
<colgroup>
|
|
<col>
|
|
<col>
|
|
</colgroup>
|
|
<thead><tr>
|
|
<th>
|
|
<p>
|
|
Name
|
|
</p>
|
|
</th>
|
|
<th>
|
|
<p>
|
|
Description
|
|
</p>
|
|
</th>
|
|
</tr></thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/max_connections.html" title="basic_socket_acceptor::max_connections"><span class="bold"><strong>max_connections</strong></span></a> <span class="silver">[static]</span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
(Deprecated: Use max_listen_connections.) The maximum length
|
|
of the queue of pending incoming connections.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/max_listen_connections.html" title="basic_socket_acceptor::max_listen_connections"><span class="bold"><strong>max_listen_connections</strong></span></a> <span class="silver">[static]</span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
The maximum length of the queue of pending incoming connections.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/message_do_not_route.html" title="basic_socket_acceptor::message_do_not_route"><span class="bold"><strong>message_do_not_route</strong></span></a> <span class="silver">[static]</span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Specify that the data should not be subject to routing.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/message_end_of_record.html" title="basic_socket_acceptor::message_end_of_record"><span class="bold"><strong>message_end_of_record</strong></span></a> <span class="silver">[static]</span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Specifies that the data marks the end of a record.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/message_out_of_band.html" title="basic_socket_acceptor::message_out_of_band"><span class="bold"><strong>message_out_of_band</strong></span></a> <span class="silver">[static]</span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Process out-of-band data.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a class="link" href="../basic_socket_acceptor/message_peek.html" title="basic_socket_acceptor::message_peek"><span class="bold"><strong>message_peek</strong></span></a> <span class="silver">[static]</span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Peek at incoming data without removing it from the input queue.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
<p>
|
|
The <a class="link" href="../basic_socket_acceptor.html" title="basic_socket_acceptor"><code class="computeroutput">basic_socket_acceptor</code></a>
|
|
class template is used for accepting new socket connections.
|
|
</p>
|
|
<h6>
|
|
<a name="boost_asio.reference.ip__tcp.acceptor.h3"></a>
|
|
<span class="phrase"><a name="boost_asio.reference.ip__tcp.acceptor.thread_safety"></a></span><a class="link" href="acceptor.html#boost_asio.reference.ip__tcp.acceptor.thread_safety">Thread Safety</a>
|
|
</h6>
|
|
<p>
|
|
<span class="emphasis"><em>Distinct</em></span> <span class="emphasis"><em>objects:</em></span> Safe.
|
|
</p>
|
|
<p>
|
|
<span class="emphasis"><em>Shared</em></span> <span class="emphasis"><em>objects:</em></span> Unsafe.
|
|
</p>
|
|
<p>
|
|
Synchronous <code class="computeroutput">accept</code> operations are thread safe, if the underlying
|
|
operating system calls are also thread safe. This means that it is permitted
|
|
to perform concurrent calls to synchronous <code class="computeroutput">accept</code> operations
|
|
on a single socket object. Other synchronous operations, such as <code class="computeroutput">open</code>
|
|
or <code class="computeroutput">close</code>, are not thread safe.
|
|
</p>
|
|
<h6>
|
|
<a name="boost_asio.reference.ip__tcp.acceptor.h4"></a>
|
|
<span class="phrase"><a name="boost_asio.reference.ip__tcp.acceptor.example"></a></span><a class="link" href="acceptor.html#boost_asio.reference.ip__tcp.acceptor.example">Example</a>
|
|
</h6>
|
|
<p>
|
|
Opening a socket acceptor with the SO_REUSEADDR option enabled:
|
|
</p>
|
|
<pre class="programlisting">boost::asio::ip::tcp::acceptor acceptor(my_context);
|
|
boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), port);
|
|
acceptor.open(endpoint.protocol());
|
|
acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true));
|
|
acceptor.bind(endpoint);
|
|
acceptor.listen();
|
|
</pre>
|
|
<h6>
|
|
<a name="boost_asio.reference.ip__tcp.acceptor.h5"></a>
|
|
<span class="phrase"><a name="boost_asio.reference.ip__tcp.acceptor.requirements"></a></span><a class="link" href="acceptor.html#boost_asio.reference.ip__tcp.acceptor.requirements">Requirements</a>
|
|
</h6>
|
|
<p>
|
|
<span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/ip/tcp.hpp</code>
|
|
</p>
|
|
<p>
|
|
<span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio.hpp</code>
|
|
</p>
|
|
</div>
|
|
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
|
<td align="left"></td>
|
|
<td align="right"><div class="copyright-footer">Copyright © 2003-2021 Christopher
|
|
M. Kohlhoff<p>
|
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
|
</p>
|
|
</div></td>
|
|
</tr></table>
|
|
<hr>
|
|
<div class="spirit-nav">
|
|
<a accesskey="p" href="../ip__tcp.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ip__tcp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../boost_asio.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="endpoint.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
|
</div>
|
|
</body>
|
|
</html>
|