implementation.qbk 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. [/
  2. / Copyright (c) 2003-2019 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. [section:implementation Platform-Specific Implementation Notes]
  8. This section lists platform-specific implementation details, such as the
  9. default demultiplexing mechanism, the number of threads created internally, and
  10. when threads are created.
  11. [heading Linux Kernel 2.4]
  12. Demultiplexing mechanism:
  13. * Uses `select` for demultiplexing. This means that the number of file
  14. descriptors in the process cannot be permitted to exceed `FD_SETSIZE`.
  15. Threads:
  16. * Demultiplexing using `select` is performed in one of the threads that calls
  17. `io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
  18. `io_context::poll_one()`.
  19. * An additional thread per `io_context` is used to emulate asynchronous host
  20. resolution. This thread is created on the first call to either
  21. `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
  22. Scatter-Gather:
  23. * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
  24. [heading Linux Kernel 2.6]
  25. Demultiplexing mechanism:
  26. * Uses `epoll` for demultiplexing.
  27. Threads:
  28. * Demultiplexing using `epoll` is performed in one of the threads that calls
  29. `io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
  30. `io_context::poll_one()`.
  31. * An additional thread per `io_context` is used to emulate asynchronous host
  32. resolution. This thread is created on the first call to either
  33. `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
  34. Scatter-Gather:
  35. * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
  36. [heading Solaris]
  37. Demultiplexing mechanism:
  38. * Uses [^/dev/poll] for demultiplexing.
  39. Threads:
  40. * Demultiplexing using [^/dev/poll] is performed in one of the threads that
  41. calls `io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
  42. `io_context::poll_one()`.
  43. * An additional thread per `io_context` is used to emulate asynchronous host
  44. resolution. This thread is created on the first call to either
  45. `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
  46. Scatter-Gather:
  47. * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
  48. [heading QNX Neutrino]
  49. Demultiplexing mechanism:
  50. * Uses `select` for demultiplexing. This means that the number of file
  51. descriptors in the process cannot be permitted to exceed `FD_SETSIZE`.
  52. Threads:
  53. * Demultiplexing using `select` is performed in one of the threads that calls
  54. `io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
  55. `io_context::poll_one()`.
  56. * An additional thread per `io_context` is used to emulate asynchronous host
  57. resolution. This thread is created on the first call to either
  58. `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
  59. Scatter-Gather:
  60. * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
  61. [heading Mac OS X]
  62. Demultiplexing mechanism:
  63. * Uses `kqueue` for demultiplexing.
  64. Threads:
  65. * Demultiplexing using `kqueue` is performed in one of the threads that calls
  66. `io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
  67. `io_context::poll_one()`.
  68. * An additional thread per `io_context` is used to emulate asynchronous host
  69. resolution. This thread is created on the first call to either
  70. `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
  71. Scatter-Gather:
  72. * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
  73. [heading FreeBSD]
  74. Demultiplexing mechanism:
  75. * Uses `kqueue` for demultiplexing.
  76. Threads:
  77. * Demultiplexing using `kqueue` is performed in one of the threads that calls
  78. `io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
  79. `io_context::poll_one()`.
  80. * An additional thread per `io_context` is used to emulate asynchronous host
  81. resolution. This thread is created on the first call to either
  82. `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
  83. Scatter-Gather:
  84. * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
  85. [heading AIX]
  86. Demultiplexing mechanism:
  87. * Uses `select` for demultiplexing. This means that the number of file
  88. descriptors in the process cannot be permitted to exceed `FD_SETSIZE`.
  89. Threads:
  90. * Demultiplexing using `select` is performed in one of the threads that calls
  91. `io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
  92. `io_context::poll_one()`.
  93. * An additional thread per `io_context` is used to emulate asynchronous host
  94. resolution. This thread is created on the first call to either
  95. `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
  96. Scatter-Gather:
  97. * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
  98. [heading HP-UX]
  99. Demultiplexing mechanism:
  100. * Uses `select` for demultiplexing. This means that the number of file
  101. descriptors in the process cannot be permitted to exceed `FD_SETSIZE`.
  102. Threads:
  103. * Demultiplexing using `select` is performed in one of the threads that calls
  104. `io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
  105. `io_context::poll_one()`.
  106. * An additional thread per `io_context` is used to emulate asynchronous host
  107. resolution. This thread is created on the first call to either
  108. `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
  109. Scatter-Gather:
  110. * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
  111. [heading Tru64]
  112. Demultiplexing mechanism:
  113. * Uses `select` for demultiplexing. This means that the number of file
  114. descriptors in the process cannot be permitted to exceed `FD_SETSIZE`.
  115. Threads:
  116. * Demultiplexing using `select` is performed in one of the threads that calls
  117. `io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
  118. `io_context::poll_one()`.
  119. * An additional thread per `io_context` is used to emulate asynchronous host
  120. resolution. This thread is created on the first call to either
  121. `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
  122. Scatter-Gather:
  123. * At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
  124. [heading Windows 95, 98 and Me]
  125. Demultiplexing mechanism:
  126. * Uses `select` for demultiplexing.
  127. Threads:
  128. * Demultiplexing using `select` is performed in one of the threads that calls
  129. `io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
  130. `io_context::poll_one()`.
  131. * An additional thread per `io_context` is used to emulate asynchronous host
  132. resolution. This thread is created on the first call to either
  133. `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
  134. Scatter-Gather:
  135. * For sockets, at most 16 buffers may be transferred in a single operation.
  136. [heading Windows NT, 2000, XP, 2003, Vista, 7 and 8]
  137. Demultiplexing mechanism:
  138. * Uses overlapped I/O and I/O completion ports for all asynchronous socket
  139. operations except for asynchronous connect.
  140. * Uses `select` for emulating asynchronous connect.
  141. Threads:
  142. * Demultiplexing using I/O completion ports is performed in all threads that call
  143. `io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
  144. `io_context::poll_one()`.
  145. * An additional thread per `io_context` is used to trigger timers. This thread
  146. is created on construction of the first `basic_deadline_timer` or
  147. `basic_waitable_timer` objects.
  148. * An additional thread per `io_context` is used for the `select`
  149. demultiplexing. This thread is created on the first call to `async_connect()`.
  150. * An additional thread per `io_context` is used to emulate asynchronous host
  151. resolution. This thread is created on the first call to either
  152. `ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
  153. Scatter-Gather:
  154. * For sockets, at most 64 buffers may be transferred in a single operation.
  155. * For stream-oriented handles, only one buffer may be transferred in a single
  156. operation.
  157. [heading Windows Runtime]
  158. Boost.Asio provides limited support for the Windows Runtime. It requires that the
  159. language extensions be enabled. Due to the restricted facilities exposed by the
  160. Windows Runtime API, the support comes with the following caveats:
  161. * The core facilities such as the `io_context`, `strand`, buffers, composed
  162. operations, timers, etc., should all work as normal.
  163. * For sockets, only client-side TCP is supported.
  164. * Explicit binding of a client-side TCP socket is not supported.
  165. * The `cancel()` function is not supported for sockets. Asynchronous
  166. operations may only be cancelled by closing the socket.
  167. * Operations that use `null_buffers` are not supported.
  168. * Only `tcp::no_delay` and `socket_base::keep_alive` options are supported.
  169. * Resolvers do not support service names, only numbers. I.e. you must
  170. use "80" rather than "http".
  171. * Most resolver query flags have no effect.
  172. Demultiplexing mechanism:
  173. * Uses the `Windows::Networking::Sockets::StreamSocket` class to implement
  174. asynchronous TCP socket operations.
  175. Threads:
  176. * Event completions are delivered to the Windows thread pool and posted to the
  177. `io_context` for the handler to be executed.
  178. * An additional thread per `io_context` is used to trigger timers. This thread
  179. is created on construction of the first timer objects.
  180. Scatter-Gather:
  181. * For sockets, at most one buffer may be transferred in a single operation.
  182. [endsect]