]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | [/ |
2 | / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) | |
3 | / | |
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) | |
6 | /] | |
7 | ||
8 | [section:implementation Platform-Specific Implementation Notes] | |
9 | ||
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. | |
13 | ||
14 | ||
15 | [heading Linux Kernel 2.4] | |
16 | ||
17 | Demultiplexing mechanism: | |
18 | ||
19 | * Uses `select` for demultiplexing. This means that the number of file | |
20 | descriptors in the process cannot be permitted to exceed `FD_SETSIZE`. | |
21 | ||
22 | Threads: | |
23 | ||
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()`. | |
27 | ||
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()`. | |
31 | ||
32 | Scatter-Gather: | |
33 | ||
34 | * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation. | |
35 | ||
36 | [heading Linux Kernel 2.6] | |
37 | ||
38 | Demultiplexing mechanism: | |
39 | ||
40 | * Uses `epoll` for demultiplexing. | |
41 | ||
42 | Threads: | |
43 | ||
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()`. | |
47 | ||
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()`. | |
51 | ||
52 | Scatter-Gather: | |
53 | ||
54 | * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation. | |
55 | ||
56 | ||
57 | [heading Solaris] | |
58 | ||
59 | Demultiplexing mechanism: | |
60 | ||
61 | * Uses [^/dev/poll] for demultiplexing. | |
62 | ||
63 | Threads: | |
64 | ||
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()`. | |
68 | ||
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()`. | |
72 | ||
73 | Scatter-Gather: | |
74 | ||
75 | * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation. | |
76 | ||
77 | ||
78 | [heading QNX Neutrino] | |
79 | ||
80 | Demultiplexing mechanism: | |
81 | ||
82 | * Uses `select` for demultiplexing. This means that the number of file | |
83 | descriptors in the process cannot be permitted to exceed `FD_SETSIZE`. | |
84 | ||
85 | Threads: | |
86 | ||
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()`. | |
90 | ||
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()`. | |
94 | ||
95 | Scatter-Gather: | |
96 | ||
97 | * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation. | |
98 | ||
99 | ||
100 | [heading Mac OS X] | |
101 | ||
102 | Demultiplexing mechanism: | |
103 | ||
104 | * Uses `kqueue` for demultiplexing. | |
105 | ||
106 | Threads: | |
107 | ||
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()`. | |
111 | ||
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()`. | |
115 | ||
116 | Scatter-Gather: | |
117 | ||
118 | * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation. | |
119 | ||
120 | ||
121 | [heading FreeBSD] | |
122 | ||
123 | Demultiplexing mechanism: | |
124 | ||
125 | * Uses `kqueue` for demultiplexing. | |
126 | ||
127 | Threads: | |
128 | ||
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()`. | |
132 | ||
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()`. | |
136 | ||
137 | Scatter-Gather: | |
138 | ||
139 | * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation. | |
140 | ||
141 | ||
142 | [heading AIX] | |
143 | ||
144 | Demultiplexing mechanism: | |
145 | ||
146 | * Uses `select` for demultiplexing. This means that the number of file | |
147 | descriptors in the process cannot be permitted to exceed `FD_SETSIZE`. | |
148 | ||
149 | Threads: | |
150 | ||
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()`. | |
154 | ||
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()`. | |
158 | ||
159 | Scatter-Gather: | |
160 | ||
161 | * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation. | |
162 | ||
163 | ||
164 | [heading HP-UX] | |
165 | ||
166 | Demultiplexing mechanism: | |
167 | ||
168 | * Uses `select` for demultiplexing. This means that the number of file | |
169 | descriptors in the process cannot be permitted to exceed `FD_SETSIZE`. | |
170 | ||
171 | Threads: | |
172 | ||
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()`. | |
176 | ||
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()`. | |
180 | ||
181 | Scatter-Gather: | |
182 | ||
183 | * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation. | |
184 | ||
185 | ||
186 | [heading Tru64] | |
187 | ||
188 | Demultiplexing mechanism: | |
189 | ||
190 | * Uses `select` for demultiplexing. This means that the number of file | |
191 | descriptors in the process cannot be permitted to exceed `FD_SETSIZE`. | |
192 | ||
193 | Threads: | |
194 | ||
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()`. | |
198 | ||
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()`. | |
202 | ||
203 | Scatter-Gather: | |
204 | ||
205 | * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation. | |
206 | ||
207 | ||
208 | [heading Windows 95, 98 and Me] | |
209 | ||
210 | Demultiplexing mechanism: | |
211 | ||
212 | * Uses `select` for demultiplexing. | |
213 | ||
214 | Threads: | |
215 | ||
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()`. | |
219 | ||
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()`. | |
223 | ||
224 | Scatter-Gather: | |
225 | ||
226 | * For sockets, at most 16 buffers may be transferred in a single operation. | |
227 | ||
228 | ||
229 | [heading Windows NT, 2000, XP, 2003, Vista, 7 and 8] | |
230 | ||
231 | Demultiplexing mechanism: | |
232 | ||
233 | * Uses overlapped I/O and I/O completion ports for all asynchronous socket | |
234 | operations except for asynchronous connect. | |
235 | ||
236 | * Uses `select` for emulating asynchronous connect. | |
237 | ||
238 | Threads: | |
239 | ||
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()`. | |
243 | ||
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. | |
247 | ||
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()`. | |
250 | ||
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()`. | |
254 | ||
255 | Scatter-Gather: | |
256 | ||
257 | * For sockets, at most 64 buffers may be transferred in a single operation. | |
258 | ||
259 | * For stream-oriented handles, only one buffer may be transferred in a single | |
260 | operation. | |
261 | ||
262 | [heading Windows Runtime] | |
263 | ||
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: | |
267 | ||
268 | * The core facilities such as the `io_service`, `strand`, buffers, composed | |
269 | operations, timers, etc., should all work as normal. | |
270 | ||
271 | * For sockets, only client-side TCP is supported. | |
272 | ||
273 | * Explicit binding of a client-side TCP socket is not supported. | |
274 | ||
275 | * The `cancel()` function is not supported for sockets. Asynchronous | |
276 | operations may only be cancelled by closing the socket. | |
277 | ||
278 | * Operations that use `null_buffers` are not supported. | |
279 | ||
280 | * Only `tcp::no_delay` and `socket_base::keep_alive` options are supported. | |
281 | ||
282 | * Resolvers do not support service names, only numbers. I.e. you must | |
283 | use "80" rather than "http". | |
284 | ||
285 | * Most resolver query flags have no effect. | |
286 | ||
287 | Demultiplexing mechanism: | |
288 | ||
289 | * Uses the `Windows::Networking::Sockets::StreamSocket` class to implement | |
290 | asynchronous TCP socket operations. | |
291 | ||
292 | Threads: | |
293 | ||
294 | * Event completions are delivered to the Windows thread pool and posted to the | |
295 | `io_service` for the handler to be executed. | |
296 | ||
297 | * An additional thread per `io_service` is used to trigger timers. This thread | |
298 | is created on construction of the first timer objects. | |
299 | ||
300 | Scatter-Gather: | |
301 | ||
302 | * For sockets, at most one buffer may be transferred in a single operation. | |
303 | ||
304 | ||
305 | [endsect] |