This section lists platform-specific implementation details, such as the default demultiplexing mechanism, the number of threads created internally, and when threads are created.
Demultiplexing mechanism:
select
for demultiplexing.
This means that the number of file descriptors in the process cannot
be permitted to exceed FD_SETSIZE
.
Threads:
select
is performed in one of the threads that calls io_context::run()
, io_context::run_one()
, io_context::poll()
or io_context::poll_one()
.
io_context
is used to emulate asynchronous host resolution. This thread is created
on the first call to either ip::tcp::resolver::async_resolve()
or ip::udp::resolver::async_resolve()
.
Scatter-Gather:
min(64,IOV_MAX)
buffers may be transferred in a single
operation.
Demultiplexing mechanism:
epoll
for demultiplexing.
Threads:
epoll
is performed in one of the threads that calls io_context::run()
, io_context::run_one()
, io_context::poll()
or io_context::poll_one()
.
io_context
is used to emulate asynchronous host resolution. This thread is created
on the first call to either ip::tcp::resolver::async_resolve()
or ip::udp::resolver::async_resolve()
.
Scatter-Gather:
min(64,IOV_MAX)
buffers may be transferred in a single
operation.
Demultiplexing mechanism:
/dev/poll
for demultiplexing.
Threads:
/dev/poll
is performed in one
of the threads that calls io_context::run()
, io_context::run_one()
, io_context::poll()
or io_context::poll_one()
.
io_context
is used to emulate asynchronous host resolution. This thread is created
on the first call to either ip::tcp::resolver::async_resolve()
or ip::udp::resolver::async_resolve()
.
Scatter-Gather:
min(64,IOV_MAX)
buffers may be transferred in a single
operation.
Demultiplexing mechanism:
select
for demultiplexing.
This means that the number of file descriptors in the process cannot
be permitted to exceed FD_SETSIZE
.
Threads:
select
is performed in one of the threads that calls io_context::run()
, io_context::run_one()
, io_context::poll()
or io_context::poll_one()
.
io_context
is used to emulate asynchronous host resolution. This thread is created
on the first call to either ip::tcp::resolver::async_resolve()
or ip::udp::resolver::async_resolve()
.
Scatter-Gather:
min(64,IOV_MAX)
buffers may be transferred in a single
operation.
Demultiplexing mechanism:
kqueue
for demultiplexing.
Threads:
kqueue
is performed in one of the threads that calls io_context::run()
, io_context::run_one()
, io_context::poll()
or io_context::poll_one()
.
io_context
is used to emulate asynchronous host resolution. This thread is created
on the first call to either ip::tcp::resolver::async_resolve()
or ip::udp::resolver::async_resolve()
.
Scatter-Gather:
min(64,IOV_MAX)
buffers may be transferred in a single
operation.
Demultiplexing mechanism:
kqueue
for demultiplexing.
Threads:
kqueue
is performed in one of the threads that calls io_context::run()
, io_context::run_one()
, io_context::poll()
or io_context::poll_one()
.
io_context
is used to emulate asynchronous host resolution. This thread is created
on the first call to either ip::tcp::resolver::async_resolve()
or ip::udp::resolver::async_resolve()
.
Scatter-Gather:
min(64,IOV_MAX)
buffers may be transferred in a single
operation.
Demultiplexing mechanism:
select
for demultiplexing.
This means that the number of file descriptors in the process cannot
be permitted to exceed FD_SETSIZE
.
Threads:
select
is performed in one of the threads that calls io_context::run()
, io_context::run_one()
, io_context::poll()
or io_context::poll_one()
.
io_context
is used to emulate asynchronous host resolution. This thread is created
on the first call to either ip::tcp::resolver::async_resolve()
or ip::udp::resolver::async_resolve()
.
Scatter-Gather:
min(64,IOV_MAX)
buffers may be transferred in a single
operation.
Demultiplexing mechanism:
select
for demultiplexing.
This means that the number of file descriptors in the process cannot
be permitted to exceed FD_SETSIZE
.
Threads:
select
is performed in one of the threads that calls io_context::run()
, io_context::run_one()
, io_context::poll()
or io_context::poll_one()
.
io_context
is used to emulate asynchronous host resolution. This thread is created
on the first call to either ip::tcp::resolver::async_resolve()
or ip::udp::resolver::async_resolve()
.
Scatter-Gather:
min(64,IOV_MAX)
buffers may be transferred in a single
operation.
Demultiplexing mechanism:
select
for demultiplexing.
This means that the number of file descriptors in the process cannot
be permitted to exceed FD_SETSIZE
.
Threads:
select
is performed in one of the threads that calls io_context::run()
, io_context::run_one()
, io_context::poll()
or io_context::poll_one()
.
io_context
is used to emulate asynchronous host resolution. This thread is created
on the first call to either ip::tcp::resolver::async_resolve()
or ip::udp::resolver::async_resolve()
.
Scatter-Gather:
min(64,IOV_MAX)
buffers may be transferred in a single
operation.
Demultiplexing mechanism:
select
for demultiplexing.
Threads:
select
is performed in one of the threads that calls io_context::run()
, io_context::run_one()
, io_context::poll()
or io_context::poll_one()
.
io_context
is used to emulate asynchronous host resolution. This thread is created
on the first call to either ip::tcp::resolver::async_resolve()
or ip::udp::resolver::async_resolve()
.
Scatter-Gather:
Demultiplexing mechanism:
select
for emulating
asynchronous connect.
Threads:
io_context::run()
, io_context::run_one()
, io_context::poll()
or io_context::poll_one()
.
io_context
is used to trigger timers. This thread is created on construction of
the first basic_deadline_timer
or basic_waitable_timer
objects.
io_context
may be used for select
demultiplexing. This thread is created on the first call to:
async_wait()
function, except when using
wait_read
on a
stream-oriented socket. (For wait_read
on a stream-oriented socket, the overlapped I/O operation WSARecv
is used and no additional
thread is required.)
async_connect()
operation, if the overlapped
I/O operation ConnectEx
is unavailable. (On recent versions of Windows, ConnectEx
is used and no additional thread is required.)
io_context
is used to emulate asynchronous host resolution. This thread is created
on the first call to either ip::tcp::resolver::async_resolve()
or ip::udp::resolver::async_resolve()
.
Scatter-Gather:
Asio provides limited support for the Windows Runtime. It requires that the language extensions be enabled. Due to the restricted facilities exposed by the Windows Runtime API, the support comes with the following caveats:
io_context
,
strand
, buffers, composed
operations, timers, etc., should all work as normal.
cancel()
function is not supported for sockets. Asynchronous operations may only
be cancelled by closing the socket.
null_buffers
are not supported.
tcp::no_delay
and socket_base::keep_alive
options are supported.
Demultiplexing mechanism:
Windows::Networking::Sockets::StreamSocket
class to implement asynchronous
TCP socket operations.
Threads:
io_context
for
the handler to be executed.
io_context
is used to trigger timers. This thread is created on construction of
the first timer objects.
Scatter-Gather: