2 / Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
4 / Distributed under the Boost Software License, Version 1.0. (See accompanying
5 / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 [section:implementation Platform-Specific Implementation Notes]
10 This section lists platform-specific implementation details, such as the
11 default demultiplexing mechanism, the number of threads created internally, and
12 when threads are created.
15 [heading Linux Kernel 2.4]
17 Demultiplexing mechanism:
19 * Uses `select` for demultiplexing. This means that the number of file
20 descriptors in the process cannot be permitted to exceed `FD_SETSIZE`.
24 * Demultiplexing using `select` is performed in one of the threads that calls
25 `io_service::run()`, `io_service::run_one()`, `io_service::poll()` or
26 `io_service::poll_one()`.
28 * An additional thread per `io_service` is used to emulate asynchronous host
29 resolution. This thread is created on the first call to either
30 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
34 * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
36 [heading Linux Kernel 2.6]
38 Demultiplexing mechanism:
40 * Uses `epoll` for demultiplexing.
44 * Demultiplexing using `epoll` is performed in one of the threads that calls
45 `io_service::run()`, `io_service::run_one()`, `io_service::poll()` or
46 `io_service::poll_one()`.
48 * An additional thread per `io_service` is used to emulate asynchronous host
49 resolution. This thread is created on the first call to either
50 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
54 * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
59 Demultiplexing mechanism:
61 * Uses [^/dev/poll] for demultiplexing.
65 * Demultiplexing using [^/dev/poll] is performed in one of the threads that
66 calls `io_service::run()`, `io_service::run_one()`, `io_service::poll()` or
67 `io_service::poll_one()`.
69 * An additional thread per `io_service` is used to emulate asynchronous host
70 resolution. This thread is created on the first call to either
71 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
75 * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
78 [heading QNX Neutrino]
80 Demultiplexing mechanism:
82 * Uses `select` for demultiplexing. This means that the number of file
83 descriptors in the process cannot be permitted to exceed `FD_SETSIZE`.
87 * Demultiplexing using `select` is performed in one of the threads that calls
88 `io_service::run()`, `io_service::run_one()`, `io_service::poll()` or
89 `io_service::poll_one()`.
91 * An additional thread per `io_service` is used to emulate asynchronous host
92 resolution. This thread is created on the first call to either
93 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
97 * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
102 Demultiplexing mechanism:
104 * Uses `kqueue` for demultiplexing.
108 * Demultiplexing using `kqueue` is performed in one of the threads that calls
109 `io_service::run()`, `io_service::run_one()`, `io_service::poll()` or
110 `io_service::poll_one()`.
112 * An additional thread per `io_service` is used to emulate asynchronous host
113 resolution. This thread is created on the first call to either
114 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
118 * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
123 Demultiplexing mechanism:
125 * Uses `kqueue` for demultiplexing.
129 * Demultiplexing using `kqueue` is performed in one of the threads that calls
130 `io_service::run()`, `io_service::run_one()`, `io_service::poll()` or
131 `io_service::poll_one()`.
133 * An additional thread per `io_service` is used to emulate asynchronous host
134 resolution. This thread is created on the first call to either
135 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
139 * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
144 Demultiplexing mechanism:
146 * Uses `select` for demultiplexing. This means that the number of file
147 descriptors in the process cannot be permitted to exceed `FD_SETSIZE`.
151 * Demultiplexing using `select` is performed in one of the threads that calls
152 `io_service::run()`, `io_service::run_one()`, `io_service::poll()` or
153 `io_service::poll_one()`.
155 * An additional thread per `io_service` is used to emulate asynchronous host
156 resolution. This thread is created on the first call to either
157 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
161 * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
166 Demultiplexing mechanism:
168 * Uses `select` for demultiplexing. This means that the number of file
169 descriptors in the process cannot be permitted to exceed `FD_SETSIZE`.
173 * Demultiplexing using `select` is performed in one of the threads that calls
174 `io_service::run()`, `io_service::run_one()`, `io_service::poll()` or
175 `io_service::poll_one()`.
177 * An additional thread per `io_service` is used to emulate asynchronous host
178 resolution. This thread is created on the first call to either
179 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
183 * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
188 Demultiplexing mechanism:
190 * Uses `select` for demultiplexing. This means that the number of file
191 descriptors in the process cannot be permitted to exceed `FD_SETSIZE`.
195 * Demultiplexing using `select` is performed in one of the threads that calls
196 `io_service::run()`, `io_service::run_one()`, `io_service::poll()` or
197 `io_service::poll_one()`.
199 * An additional thread per `io_service` is used to emulate asynchronous host
200 resolution. This thread is created on the first call to either
201 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
205 * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
208 [heading Windows 95, 98 and Me]
210 Demultiplexing mechanism:
212 * Uses `select` for demultiplexing.
216 * Demultiplexing using `select` is performed in one of the threads that calls
217 `io_service::run()`, `io_service::run_one()`, `io_service::poll()` or
218 `io_service::poll_one()`.
220 * An additional thread per `io_service` is used to emulate asynchronous host
221 resolution. This thread is created on the first call to either
222 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
226 * For sockets, at most 16 buffers may be transferred in a single operation.
229 [heading Windows NT, 2000, XP, 2003, Vista, 7 and 8]
231 Demultiplexing mechanism:
233 * Uses overlapped I/O and I/O completion ports for all asynchronous socket
234 operations except for asynchronous connect.
236 * Uses `select` for emulating asynchronous connect.
240 * Demultiplexing using I/O completion ports is performed in all threads that call
241 `io_service::run()`, `io_service::run_one()`, `io_service::poll()` or
242 `io_service::poll_one()`.
244 * An additional thread per `io_service` is used to trigger timers. This thread
245 is created on construction of the first `deadline_timer` or
246 `deadline_timer_service` objects.
248 * An additional thread per `io_service` is used for the `select`
249 demultiplexing. This thread is created on the first call to `async_connect()`.
251 * An additional thread per `io_service` is used to emulate asynchronous host
252 resolution. This thread is created on the first call to either
253 `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
257 * For sockets, at most 64 buffers may be transferred in a single operation.
259 * For stream-oriented handles, only one buffer may be transferred in a single
262 [heading Windows Runtime]
264 Boost.Asio provides limited support for the Windows Runtime. It requires that the
265 language extensions be enabled. Due to the restricted facilities exposed by the
266 Windows Runtime API, the support comes with the following caveats:
268 * The core facilities such as the `io_service`, `strand`, buffers, composed
269 operations, timers, etc., should all work as normal.
271 * For sockets, only client-side TCP is supported.
273 * Explicit binding of a client-side TCP socket is not supported.
275 * The `cancel()` function is not supported for sockets. Asynchronous
276 operations may only be cancelled by closing the socket.
278 * Operations that use `null_buffers` are not supported.
280 * Only `tcp::no_delay` and `socket_base::keep_alive` options are supported.
282 * Resolvers do not support service names, only numbers. I.e. you must
283 use "80" rather than "http".
285 * Most resolver query flags have no effect.
287 Demultiplexing mechanism:
289 * Uses the `Windows::Networking::Sockets::StreamSocket` class to implement
290 asynchronous TCP socket operations.
294 * Event completions are delivered to the Windows thread pool and posted to the
295 `io_service` for the handler to be executed.
297 * An additional thread per `io_service` is used to trigger timers. This thread
298 is created on construction of the first timer objects.
302 * For sockets, at most one buffer may be transferred in a single operation.