passenger 6.0.26 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (915) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +38 -1
  3. data/CONTRIBUTING.md +2 -2
  4. data/CONTRIBUTORS +2 -0
  5. data/bin/passenger-install-apache2-module +6 -3
  6. data/bin/passenger-install-nginx-module +8 -3
  7. data/build/agent.rb +0 -2
  8. data/build/basics.rb +2 -0
  9. data/build/common_library.rb +0 -6
  10. data/build/misc.rb +0 -2
  11. data/build/schema_printer.rb +0 -2
  12. data/build/support/cxx_dependency_map.rb +60 -875
  13. data/dev/copy_boost_headers +3 -14
  14. data/dev/index_cxx_dependencies.rb +5 -1
  15. data/doc/AiInstructions.md +112 -0
  16. data/doc/CxxMockingStrategy.md +42 -0
  17. data/doc/CxxTestingGuide.md +110 -0
  18. data/doc/DesignAspects/LimitedGemDependencies.md +22 -14
  19. data/doc/TempFileHandling.md +15 -0
  20. data/package.json +1 -1
  21. data/passenger.gemspec +1 -1
  22. data/resources/templates/standalone/server.erb +1 -0
  23. data/src/agent/Core/ApiServer.h +0 -1
  24. data/src/agent/Core/ApplicationPool/AbstractSession.h +10 -1
  25. data/src/agent/Core/ApplicationPool/Group/ProcessListManagement.cpp +1 -1
  26. data/src/agent/Core/ApplicationPool/Group/SessionManagement.cpp +33 -18
  27. data/src/agent/Core/ApplicationPool/Group.h +0 -1
  28. data/src/agent/Core/ApplicationPool/Implementation.cpp +1 -4
  29. data/src/agent/Core/ApplicationPool/Session.h +14 -19
  30. data/src/agent/Core/ApplicationPool/Socket.h +15 -5
  31. data/src/agent/Core/ApplicationPool/TestSession.h +73 -15
  32. data/src/agent/Core/Config.h +2 -39
  33. data/src/agent/Core/ConfigChange.cpp +1 -41
  34. data/src/agent/Core/Controller/CheckoutSession.cpp +100 -14
  35. data/src/agent/Core/Controller/Client.h +0 -1
  36. data/src/agent/Core/Controller/Config.h +1 -1
  37. data/src/agent/Core/Controller/Hooks.cpp +13 -0
  38. data/src/agent/Core/Controller/InitRequest.cpp +2 -0
  39. data/src/agent/Core/Controller/InternalUtils.cpp +12 -0
  40. data/src/agent/Core/Controller/Request.h +3 -2
  41. data/src/agent/Core/Controller.h +12 -13
  42. data/src/agent/Core/CoreMain.cpp +2 -56
  43. data/src/agent/Core/OptionParser.h +1 -7
  44. data/src/agent/Core/SecurityUpdateChecker.h +10 -2
  45. data/src/agent/Core/SpawningKit/Exceptions.h +0 -1
  46. data/src/agent/Core/SpawningKit/Handshake/Perform.h +13 -2
  47. data/src/agent/Shared/Fundamentals/AbortHandler.cpp +23 -5
  48. data/src/agent/Shared/Fundamentals/AbortHandler.h +10 -22
  49. data/src/agent/Shared/Fundamentals/Initialization.cpp +1 -0
  50. data/src/agent/Watchdog/Config.h +2 -21
  51. data/src/agent/Watchdog/WatchdogMain.cpp +0 -2
  52. data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +5 -20
  53. data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp +5 -0
  54. data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +14 -60
  55. data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +3 -0
  56. data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp +3 -0
  57. data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +11 -0
  58. data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +7 -0
  59. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +17 -0
  60. data/src/apache2_module/Hooks.cpp +0 -10
  61. data/src/apache2_module/ServerConfig/AutoGeneratedManifestGeneration.cpp +0 -44
  62. data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h +0 -52
  63. data/src/cxx_supportlib/Algorithms/Hasher.cpp +1 -1
  64. data/src/cxx_supportlib/Algorithms/Hasher.h +4 -7
  65. data/src/cxx_supportlib/Algorithms/MovingAverage.h +1 -160
  66. data/src/cxx_supportlib/ConfigKit/IN_PRACTICE.md +2 -12
  67. data/src/cxx_supportlib/ConfigKit/Store.h +1 -6
  68. data/src/cxx_supportlib/Constants.h +2 -1
  69. data/src/cxx_supportlib/DataStructures/StringKeyTable.h +1 -7
  70. data/src/cxx_supportlib/DataStructures/StringMap.h +2 -3
  71. data/src/cxx_supportlib/Exceptions.cpp +178 -0
  72. data/src/cxx_supportlib/Exceptions.h +62 -177
  73. data/src/cxx_supportlib/FileTools/FileManip.h +2 -0
  74. data/src/cxx_supportlib/Hooks.h +0 -1
  75. data/src/cxx_supportlib/IOTools/IOUtils.cpp +266 -250
  76. data/src/cxx_supportlib/IOTools/IOUtils.h +87 -132
  77. data/src/cxx_supportlib/ServerKit/AcceptLoadBalancer.h +2 -0
  78. data/src/cxx_supportlib/ServerKit/Config.h +1 -6
  79. data/src/cxx_supportlib/ServerKit/FileBufferedChannel.h +1 -1
  80. data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +8 -6
  81. data/src/cxx_supportlib/StaticString.h +1 -6
  82. data/src/cxx_supportlib/StrIntTools/StrIntUtils.h +2 -2
  83. data/src/cxx_supportlib/SystemTools/SystemMetricsCollector.h +0 -2
  84. data/src/cxx_supportlib/Utils/Curl.h +1 -6
  85. data/src/cxx_supportlib/Utils/FastStringStream.h +7 -7
  86. data/src/cxx_supportlib/Utils/IniFile.h +24 -25
  87. data/src/cxx_supportlib/Utils/ScopeGuard.h +0 -32
  88. data/src/cxx_supportlib/Utils.h +0 -30
  89. data/src/cxx_supportlib/oxt/detail/tracable_exception_disabled.hpp +4 -0
  90. data/src/cxx_supportlib/oxt/detail/tracable_exception_enabled.hpp +1 -0
  91. data/src/cxx_supportlib/oxt/implementation.cpp +41 -2
  92. data/src/cxx_supportlib/oxt/spin_lock.hpp +94 -23
  93. data/src/cxx_supportlib/oxt/system_calls.cpp +1 -0
  94. data/src/cxx_supportlib/oxt/system_calls.hpp +3 -4
  95. data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +2 -2
  96. data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +5 -0
  97. data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_begin.hpp +1 -0
  98. data/src/cxx_supportlib/vendor-modified/boost/container/detail/container_or_allocator_rebind.hpp +1 -2
  99. data/src/cxx_supportlib/vendor-modified/boost/container/detail/container_rebind.hpp +23 -13
  100. data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +72 -49
  101. data/src/cxx_supportlib/vendor-modified/boost/container/detail/function_detector.hpp +1 -1
  102. data/src/cxx_supportlib/vendor-modified/boost/container/detail/is_contiguous_container.hpp +15 -11
  103. data/src/cxx_supportlib/vendor-modified/boost/container/detail/tree.hpp +4 -0
  104. data/src/cxx_supportlib/vendor-modified/boost/container/devector.hpp +36 -9
  105. data/src/cxx_supportlib/vendor-modified/boost/container/flat_map.hpp +9 -2
  106. data/src/cxx_supportlib/vendor-modified/boost/container/list.hpp +4 -0
  107. data/src/cxx_supportlib/vendor-modified/boost/container/options.hpp +21 -17
  108. data/src/cxx_supportlib/vendor-modified/boost/container/slist.hpp +5 -0
  109. data/src/cxx_supportlib/vendor-modified/boost/container/small_vector.hpp +10 -6
  110. data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +8 -3
  111. data/src/cxx_supportlib/vendor-modified/boost/container/static_vector.hpp +21 -3
  112. data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +5 -15
  113. data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +73 -14
  114. data/src/cxx_supportlib/vendor-modified/boost/detail/basic_pointerbuf.hpp +1 -2
  115. data/src/cxx_supportlib/vendor-modified/boost/detail/lcast_precision.hpp +18 -29
  116. data/src/cxx_supportlib/vendor-modified/boost/function/function_template.hpp +7 -7
  117. data/src/cxx_supportlib/vendor-modified/boost/integer/common_factor_rt.hpp +6 -10
  118. data/src/cxx_supportlib/vendor-modified/boost/intrusive/avl_set.hpp +8 -0
  119. data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree.hpp +4 -0
  120. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bs_set.hpp +8 -0
  121. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree.hpp +12 -4
  122. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/function_detector.hpp +1 -1
  123. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/parent_from_member.hpp +5 -4
  124. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/workaround.hpp +10 -0
  125. data/src/cxx_supportlib/vendor-modified/boost/intrusive/list.hpp +5 -0
  126. data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree.hpp +4 -0
  127. data/src/cxx_supportlib/vendor-modified/boost/intrusive/set.hpp +8 -0
  128. data/src/cxx_supportlib/vendor-modified/boost/intrusive/sg_set.hpp +8 -0
  129. data/src/cxx_supportlib/vendor-modified/boost/intrusive/sgtree.hpp +4 -0
  130. data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist.hpp +5 -0
  131. data/src/cxx_supportlib/vendor-modified/boost/intrusive/splay_set.hpp +8 -0
  132. data/src/cxx_supportlib/vendor-modified/boost/intrusive/splaytree.hpp +4 -0
  133. data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap.hpp +4 -0
  134. data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_set.hpp +8 -0
  135. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +7 -7
  136. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/inf_nan.hpp +1 -1
  137. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_unsigned_converters.hpp +1 -1
  138. data/src/cxx_supportlib/vendor-modified/boost/move/adl_move_swap.hpp +2 -0
  139. data/src/cxx_supportlib/vendor-modified/boost/move/core.hpp +4 -4
  140. data/src/cxx_supportlib/vendor-modified/boost/move/detail/meta_utils.hpp +1 -20
  141. data/src/cxx_supportlib/vendor-modified/boost/move/detail/meta_utils_core.hpp +15 -0
  142. data/src/cxx_supportlib/vendor-modified/boost/move/detail/nsec_clock.hpp +1 -1
  143. data/src/cxx_supportlib/vendor-modified/boost/move/detail/placement_new.hpp +2 -0
  144. data/src/cxx_supportlib/vendor-modified/boost/move/detail/std_ns_begin.hpp +7 -7
  145. data/src/cxx_supportlib/vendor-modified/boost/move/detail/std_ns_end.hpp +3 -0
  146. data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_count.hpp +4 -4
  147. data/src/cxx_supportlib/vendor-modified/boost/mp11/version.hpp +1 -1
  148. data/src/cxx_supportlib/vendor-modified/boost/none.hpp +1 -1
  149. data/src/cxx_supportlib/vendor-modified/boost/none_t.hpp +10 -4
  150. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/experimental_traits.hpp +4 -49
  151. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_aligned_storage.hpp +2 -3
  152. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_config.hpp +13 -4
  153. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_reference_spec.hpp +47 -46
  154. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_relops.hpp +11 -11
  155. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_swap.hpp +3 -3
  156. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_trivially_copyable_base.hpp +12 -252
  157. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_utility.hpp +41 -0
  158. data/src/cxx_supportlib/vendor-modified/boost/optional/optional.hpp +101 -592
  159. data/src/cxx_supportlib/vendor-modified/boost/optional/optional_io.hpp +1 -5
  160. data/src/cxx_supportlib/vendor-modified/boost/pointer_cast.hpp +12 -24
  161. data/src/cxx_supportlib/vendor-modified/boost/random/beta_distribution.hpp +5 -5
  162. data/src/cxx_supportlib/vendor-modified/boost/random/hyperexponential_distribution.hpp +15 -15
  163. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/allocate_shared_array.hpp +37 -44
  164. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/bad_weak_ptr.hpp +1 -23
  165. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count.hpp +1 -0
  166. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/deprecated_macros.hpp +52 -0
  167. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/local_counted_base.hpp +14 -18
  168. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/local_sp_deleter.hpp +7 -15
  169. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/shared_count.hpp +39 -90
  170. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_convertible.hpp +0 -16
  171. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base.hpp +1 -0
  172. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_nt.hpp +13 -14
  173. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp +16 -17
  174. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_impl.hpp +16 -55
  175. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_noexcept.hpp +5 -14
  176. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_type_traits.hpp +55 -0
  177. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock.hpp +1 -0
  178. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_std_atomic.hpp +5 -6
  179. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/enable_shared_from_this.hpp +7 -10
  180. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ptr.hpp +32 -110
  181. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ref_counter.hpp +17 -18
  182. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared.hpp +2 -6
  183. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_array.hpp +10 -9
  184. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_object.hpp +28 -565
  185. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_unique.hpp +11 -17
  186. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_array.hpp +17 -21
  187. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_ptr.hpp +20 -22
  188. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_array.hpp +34 -68
  189. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_ptr.hpp +78 -356
  190. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/weak_ptr.hpp +31 -89
  191. data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_map.hpp +195 -12
  192. data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_set.hpp +206 -17
  193. data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_node_map.hpp +1202 -0
  194. data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_node_map_fwd.hpp +67 -0
  195. data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_node_set.hpp +1065 -0
  196. data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_node_set_fwd.hpp +67 -0
  197. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/concurrent_static_asserts.hpp +30 -8
  198. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/concurrent_table.hpp +248 -47
  199. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/core.hpp +24 -0
  200. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/flat_map_types.hpp +10 -2
  201. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/flat_set_types.hpp +8 -2
  202. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/node_handle.hpp +120 -5
  203. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/node_map_handle.hpp +56 -0
  204. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/node_map_types.hpp +15 -4
  205. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/node_set_handle.hpp +48 -0
  206. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/node_set_types.hpp +13 -4
  207. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/tuple_rotate_right.hpp +11 -10
  208. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/types_constructibility.hpp +172 -0
  209. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/implementation.hpp +1 -0
  210. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/map.hpp +0 -17
  211. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/set.hpp +0 -17
  212. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/type_traits.hpp +11 -0
  213. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map.hpp +9 -0
  214. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set.hpp +9 -0
  215. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map.hpp +2 -2
  216. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_map.hpp +32 -44
  217. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_set.hpp +31 -35
  218. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_printers.hpp +414 -0
  219. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set.hpp +2 -2
  220. data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
  221. data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c +8 -32
  222. data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c +6 -0
  223. data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c +12 -48
  224. data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c +5 -0
  225. data/src/nginx_module/LocationConfig/AutoGeneratedHeaderSerialization.c +21 -0
  226. data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c +13 -0
  227. data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c +3 -0
  228. data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h +4 -0
  229. data/src/nginx_module/MainConfig/AutoGeneratedCreateFunction.c +0 -24
  230. data/src/nginx_module/MainConfig/AutoGeneratedManifestGeneration.c +0 -48
  231. data/src/nginx_module/MainConfig/AutoGeneratedStruct.h +0 -16
  232. data/src/nginx_module/ngx_http_passenger_module.c +0 -4
  233. data/src/ruby_native_extension/passenger_native_support.c +19 -3
  234. data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +8 -24
  235. data/src/ruby_supportlib/phusion_passenger/common_library.rb +0 -3
  236. data/src/ruby_supportlib/phusion_passenger/constants.rb +1 -0
  237. data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +6 -28
  238. data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +15 -18
  239. data/src/ruby_supportlib/phusion_passenger/platform_info/cxx_portability.rb +4 -29
  240. data/src/ruby_supportlib/phusion_passenger/platform_info/operating_system.rb +0 -30
  241. data/src/ruby_supportlib/phusion_passenger/rack_handler.rb +2 -2
  242. data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +8 -20
  243. data/src/ruby_supportlib/phusion_passenger.rb +7 -7
  244. data/src/schema_printer/SchemaPrinterMain.cpp +0 -4
  245. metadata +20 -675
  246. data/dev/websocketpp.patch +0 -39
  247. data/src/agent/Core/AdminPanelConnector.h +0 -680
  248. data/src/cxx_supportlib/DataStructures/HashMap.h +0 -60
  249. data/src/cxx_supportlib/FileTools/LargeFiles.cpp +0 -41
  250. data/src/cxx_supportlib/FileTools/LargeFiles.h +0 -43
  251. data/src/cxx_supportlib/WebSocketCommandReverseServer.h +0 -975
  252. data/src/cxx_supportlib/oxt/detail/spin_lock_darwin.hpp +0 -75
  253. data/src/cxx_supportlib/oxt/detail/spin_lock_gcc_x86.hpp +0 -85
  254. data/src/cxx_supportlib/oxt/detail/spin_lock_portable.hpp +0 -38
  255. data/src/cxx_supportlib/oxt/detail/spin_lock_pthreads.hpp +0 -111
  256. data/src/cxx_supportlib/vendor-modified/boost/asio/any_completion_executor.hpp +0 -338
  257. data/src/cxx_supportlib/vendor-modified/boost/asio/any_completion_handler.hpp +0 -824
  258. data/src/cxx_supportlib/vendor-modified/boost/asio/any_io_executor.hpp +0 -353
  259. data/src/cxx_supportlib/vendor-modified/boost/asio/append.hpp +0 -67
  260. data/src/cxx_supportlib/vendor-modified/boost/asio/as_tuple.hpp +0 -154
  261. data/src/cxx_supportlib/vendor-modified/boost/asio/associated_allocator.hpp +0 -216
  262. data/src/cxx_supportlib/vendor-modified/boost/asio/associated_cancellation_slot.hpp +0 -223
  263. data/src/cxx_supportlib/vendor-modified/boost/asio/associated_executor.hpp +0 -237
  264. data/src/cxx_supportlib/vendor-modified/boost/asio/associated_immediate_executor.hpp +0 -283
  265. data/src/cxx_supportlib/vendor-modified/boost/asio/associator.hpp +0 -37
  266. data/src/cxx_supportlib/vendor-modified/boost/asio/async_result.hpp +0 -950
  267. data/src/cxx_supportlib/vendor-modified/boost/asio/awaitable.hpp +0 -144
  268. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_datagram_socket.hpp +0 -1364
  269. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_deadline_timer.hpp +0 -712
  270. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_file.hpp +0 -826
  271. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_io_object.hpp +0 -288
  272. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_random_access_file.hpp +0 -691
  273. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_raw_socket.hpp +0 -1358
  274. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_readable_pipe.hpp +0 -628
  275. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_seq_packet_socket.hpp +0 -825
  276. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_serial_port.hpp +0 -989
  277. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_signal_set.hpp +0 -650
  278. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket.hpp +0 -1938
  279. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_acceptor.hpp +0 -2710
  280. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_iostream.hpp +0 -333
  281. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_streambuf.hpp +0 -644
  282. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_file.hpp +0 -746
  283. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_socket.hpp +0 -1165
  284. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_streambuf.hpp +0 -452
  285. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_streambuf_fwd.hpp +0 -38
  286. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_waitable_timer.hpp +0 -826
  287. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_writable_pipe.hpp +0 -624
  288. data/src/cxx_supportlib/vendor-modified/boost/asio/bind_allocator.hpp +0 -598
  289. data/src/cxx_supportlib/vendor-modified/boost/asio/bind_cancellation_slot.hpp +0 -615
  290. data/src/cxx_supportlib/vendor-modified/boost/asio/bind_executor.hpp +0 -666
  291. data/src/cxx_supportlib/vendor-modified/boost/asio/bind_immediate_executor.hpp +0 -618
  292. data/src/cxx_supportlib/vendor-modified/boost/asio/buffer.hpp +0 -2755
  293. data/src/cxx_supportlib/vendor-modified/boost/asio/buffer_registration.hpp +0 -320
  294. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_read_stream.hpp +0 -275
  295. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_read_stream_fwd.hpp +0 -27
  296. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_stream.hpp +0 -294
  297. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_stream_fwd.hpp +0 -27
  298. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_write_stream.hpp +0 -267
  299. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_write_stream_fwd.hpp +0 -27
  300. data/src/cxx_supportlib/vendor-modified/boost/asio/buffers_iterator.hpp +0 -523
  301. data/src/cxx_supportlib/vendor-modified/boost/asio/cancel_after.hpp +0 -303
  302. data/src/cxx_supportlib/vendor-modified/boost/asio/cancel_at.hpp +0 -296
  303. data/src/cxx_supportlib/vendor-modified/boost/asio/cancellation_signal.hpp +0 -247
  304. data/src/cxx_supportlib/vendor-modified/boost/asio/cancellation_state.hpp +0 -237
  305. data/src/cxx_supportlib/vendor-modified/boost/asio/cancellation_type.hpp +0 -159
  306. data/src/cxx_supportlib/vendor-modified/boost/asio/co_composed.hpp +0 -1323
  307. data/src/cxx_supportlib/vendor-modified/boost/asio/co_spawn.hpp +0 -525
  308. data/src/cxx_supportlib/vendor-modified/boost/asio/completion_condition.hpp +0 -269
  309. data/src/cxx_supportlib/vendor-modified/boost/asio/compose.hpp +0 -130
  310. data/src/cxx_supportlib/vendor-modified/boost/asio/composed.hpp +0 -415
  311. data/src/cxx_supportlib/vendor-modified/boost/asio/connect.hpp +0 -1348
  312. data/src/cxx_supportlib/vendor-modified/boost/asio/connect_pipe.hpp +0 -85
  313. data/src/cxx_supportlib/vendor-modified/boost/asio/consign.hpp +0 -77
  314. data/src/cxx_supportlib/vendor-modified/boost/asio/coroutine.hpp +0 -330
  315. data/src/cxx_supportlib/vendor-modified/boost/asio/deadline_timer.hpp +0 -40
  316. data/src/cxx_supportlib/vendor-modified/boost/asio/default_completion_token.hpp +0 -91
  317. data/src/cxx_supportlib/vendor-modified/boost/asio/defer.hpp +0 -220
  318. data/src/cxx_supportlib/vendor-modified/boost/asio/deferred.hpp +0 -721
  319. data/src/cxx_supportlib/vendor-modified/boost/asio/detached.hpp +0 -107
  320. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/array.hpp +0 -32
  321. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/array_fwd.hpp +0 -32
  322. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/assert.hpp +0 -32
  323. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/atomic_count.hpp +0 -61
  324. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/base_from_cancellation_state.hpp +0 -166
  325. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/base_from_completion_cond.hpp +0 -71
  326. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/bind_handler.hpp +0 -713
  327. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/blocking_executor_op.hpp +0 -109
  328. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffer_resize_guard.hpp +0 -68
  329. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffer_sequence_adapter.hpp +0 -839
  330. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffered_stream_storage.hpp +0 -128
  331. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/call_stack.hpp +0 -127
  332. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/chrono.hpp +0 -47
  333. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/chrono_time_traits.hpp +0 -192
  334. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/completion_handler.hpp +0 -90
  335. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/completion_message.hpp +0 -129
  336. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/completion_payload.hpp +0 -222
  337. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/completion_payload_handler.hpp +0 -81
  338. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/composed_work.hpp +0 -254
  339. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/concurrency_hint.hpp +0 -94
  340. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/conditionally_enabled_event.hpp +0 -122
  341. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/conditionally_enabled_mutex.hpp +0 -151
  342. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/config.hpp +0 -1413
  343. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/consuming_buffers.hpp +0 -445
  344. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/cstddef.hpp +0 -29
  345. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/cstdint.hpp +0 -42
  346. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/date_time_fwd.hpp +0 -34
  347. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/deadline_timer_service.hpp +0 -341
  348. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/dependent_type.hpp +0 -38
  349. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_ops.hpp +0 -181
  350. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_read_op.hpp +0 -190
  351. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_write_op.hpp +0 -189
  352. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/dev_poll_reactor.hpp +0 -249
  353. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/epoll_reactor.hpp +0 -297
  354. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/event.hpp +0 -48
  355. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/eventfd_select_interrupter.hpp +0 -85
  356. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/exception.hpp +0 -31
  357. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/executor_function.hpp +0 -154
  358. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/executor_op.hpp +0 -86
  359. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/fd_set_adapter.hpp +0 -41
  360. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/fenced_block.hpp +0 -42
  361. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/functional.hpp +0 -35
  362. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/future.hpp +0 -32
  363. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/global.hpp +0 -52
  364. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_alloc_helpers.hpp +0 -123
  365. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_cont_helpers.hpp +0 -45
  366. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_tracking.hpp +0 -268
  367. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_type_requirements.hpp +0 -555
  368. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_work.hpp +0 -513
  369. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/hash_map.hpp +0 -333
  370. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/buffer_sequence_adapter.ipp +0 -120
  371. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/descriptor_ops.ipp +0 -996
  372. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.hpp +0 -113
  373. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.ipp +0 -471
  374. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/epoll_reactor.hpp +0 -111
  375. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/epoll_reactor.ipp +0 -828
  376. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/eventfd_select_interrupter.ipp +0 -173
  377. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/handler_tracking.ipp +0 -400
  378. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/io_uring_descriptor_service.ipp +0 -207
  379. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/io_uring_file_service.ipp +0 -142
  380. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/io_uring_service.hpp +0 -114
  381. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/io_uring_service.ipp +0 -916
  382. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/io_uring_socket_service_base.ipp +0 -251
  383. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/kqueue_reactor.hpp +0 -115
  384. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/kqueue_reactor.ipp +0 -610
  385. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/null_event.ipp +0 -76
  386. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/pipe_select_interrupter.ipp +0 -131
  387. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_event.ipp +0 -65
  388. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_mutex.ipp +0 -48
  389. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_serial_port_service.ipp +0 -170
  390. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_thread.ipp +0 -86
  391. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_tss_ptr.ipp +0 -48
  392. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_descriptor_service.ipp +0 -234
  393. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_socket_service_base.ipp +0 -314
  394. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/resolver_service_base.ipp +0 -160
  395. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/scheduler.ipp +0 -677
  396. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.hpp +0 -126
  397. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.ipp +0 -402
  398. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/service_registry.hpp +0 -95
  399. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/service_registry.ipp +0 -199
  400. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/signal_set_service.ipp +0 -828
  401. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_ops.ipp +0 -4046
  402. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_select_interrupter.ipp +0 -187
  403. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_executor_service.hpp +0 -348
  404. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_executor_service.ipp +0 -160
  405. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_service.hpp +0 -88
  406. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_service.ipp +0 -204
  407. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/thread_context.ipp +0 -37
  408. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/throw_error.ipp +0 -51
  409. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/timer_queue_ptime.ipp +0 -99
  410. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/timer_queue_set.ipp +0 -103
  411. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/initiate_defer.hpp +0 -209
  412. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/initiate_dispatch.hpp +0 -195
  413. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/initiate_post.hpp +0 -209
  414. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/initiation_base.hpp +0 -64
  415. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_control.hpp +0 -86
  416. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_object_impl.hpp +0 -179
  417. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_descriptor_read_at_op.hpp +0 -197
  418. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_descriptor_read_op.hpp +0 -192
  419. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_descriptor_service.hpp +0 -689
  420. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_descriptor_write_at_op.hpp +0 -191
  421. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_descriptor_write_op.hpp +0 -187
  422. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_file_service.hpp +0 -263
  423. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_null_buffers_op.hpp +0 -116
  424. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_operation.hpp +0 -86
  425. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_service.hpp +0 -321
  426. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_accept_op.hpp +0 -282
  427. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_connect_op.hpp +0 -142
  428. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_recv_op.hpp +0 -207
  429. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_recvfrom_op.hpp +0 -208
  430. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_recvmsg_op.hpp +0 -194
  431. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_send_op.hpp +0 -193
  432. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_sendto_op.hpp +0 -196
  433. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_service.hpp +0 -631
  434. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_service_base.hpp +0 -665
  435. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_wait_op.hpp +0 -114
  436. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/is_buffer_sequence.hpp +0 -298
  437. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/is_executor.hpp +0 -128
  438. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/keyword_tss_ptr.hpp +0 -72
  439. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/kqueue_reactor.hpp +0 -273
  440. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/limits.hpp +0 -21
  441. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/local_free_on_block_exit.hpp +0 -61
  442. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/memory.hpp +0 -128
  443. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/mutex.hpp +0 -48
  444. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/non_const_lvalue.hpp +0 -45
  445. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/noncopyable.hpp +0 -45
  446. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_event.hpp +0 -108
  447. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_fenced_block.hpp +0 -49
  448. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_global.hpp +0 -61
  449. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_mutex.hpp +0 -62
  450. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_reactor.hpp +0 -85
  451. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_signal_blocker.hpp +0 -71
  452. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_socket_service.hpp +0 -521
  453. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_static_mutex.hpp +0 -62
  454. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_thread.hpp +0 -69
  455. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_tss_ptr.hpp +0 -70
  456. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/object_pool.hpp +0 -173
  457. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/op_queue.hpp +0 -164
  458. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/operation.hpp +0 -40
  459. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/pipe_select_interrupter.hpp +0 -91
  460. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/pop_options.hpp +0 -157
  461. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_event.hpp +0 -177
  462. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_fd_set_adapter.hpp +0 -120
  463. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_global.hpp +0 -82
  464. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_mutex.hpp +0 -78
  465. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_serial_port_service.hpp +0 -251
  466. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_signal_blocker.hpp +0 -87
  467. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_static_mutex.hpp +0 -66
  468. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_thread.hpp +0 -111
  469. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_tss_ptr.hpp +0 -81
  470. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/push_options.hpp +0 -228
  471. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_descriptor_service.hpp +0 -572
  472. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_null_buffers_op.hpp +0 -133
  473. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_accept_op.hpp +0 -325
  474. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_connect_op.hpp +0 -164
  475. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recv_op.hpp +0 -199
  476. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recvfrom_op.hpp +0 -205
  477. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recvmsg_op.hpp +0 -186
  478. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_send_op.hpp +0 -202
  479. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_sendto_op.hpp +0 -196
  480. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service.hpp +0 -635
  481. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service_base.hpp +0 -757
  482. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_wait_op.hpp +0 -133
  483. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor.hpp +0 -56
  484. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_op.hpp +0 -73
  485. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_op_queue.hpp +0 -214
  486. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/recycling_allocator.hpp +0 -116
  487. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/regex_fwd.hpp +0 -35
  488. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_endpoint_op.hpp +0 -142
  489. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_op.hpp +0 -47
  490. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_query_op.hpp +0 -152
  491. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolver_service.hpp +0 -149
  492. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolver_service_base.hpp +0 -160
  493. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler.hpp +0 -243
  494. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler_operation.hpp +0 -80
  495. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler_task.hpp +0 -51
  496. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler_thread_info.hpp +0 -42
  497. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scoped_lock.hpp +0 -103
  498. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scoped_ptr.hpp +0 -89
  499. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/select_interrupter.hpp +0 -48
  500. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/select_reactor.hpp +0 -293
  501. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/service_registry.hpp +0 -165
  502. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_blocker.hpp +0 -46
  503. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_handler.hpp +0 -92
  504. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_init.hpp +0 -49
  505. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_op.hpp +0 -55
  506. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_set_service.hpp +0 -294
  507. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_holder.hpp +0 -100
  508. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_ops.hpp +0 -377
  509. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_option.hpp +0 -318
  510. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_select_interrupter.hpp +0 -93
  511. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_types.hpp +0 -429
  512. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/source_location.hpp +0 -47
  513. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/static_mutex.hpp +0 -52
  514. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_event.hpp +0 -185
  515. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_fenced_block.hpp +0 -59
  516. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_global.hpp +0 -67
  517. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_mutex.hpp +0 -70
  518. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_static_mutex.hpp +0 -78
  519. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_thread.hpp +0 -68
  520. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/strand_executor_service.hpp +0 -175
  521. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/strand_service.hpp +0 -146
  522. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/string_view.hpp +0 -49
  523. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread.hpp +0 -60
  524. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_context.hpp +0 -53
  525. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_group.hpp +0 -101
  526. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_info_base.hpp +0 -262
  527. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/throw_error.hpp +0 -64
  528. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/throw_exception.hpp +0 -57
  529. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timed_cancel_op.hpp +0 -363
  530. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue.hpp +0 -391
  531. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_base.hpp +0 -70
  532. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_ptime.hpp +0 -105
  533. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_set.hpp +0 -68
  534. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_scheduler.hpp +0 -37
  535. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_scheduler_fwd.hpp +0 -44
  536. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/tss_ptr.hpp +0 -71
  537. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/type_traits.hpp +0 -180
  538. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/utility.hpp +0 -85
  539. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wait_handler.hpp +0 -92
  540. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wait_op.hpp +0 -51
  541. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/winsock_init.hpp +0 -130
  542. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/work_dispatcher.hpp +0 -145
  543. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wrapped_handler.hpp +0 -197
  544. data/src/cxx_supportlib/vendor-modified/boost/asio/dispatch.hpp +0 -199
  545. data/src/cxx_supportlib/vendor-modified/boost/asio/error.hpp +0 -390
  546. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/allocator.hpp +0 -280
  547. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/any_executor.hpp +0 -1935
  548. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bad_executor.hpp +0 -48
  549. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking.hpp +0 -1362
  550. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking_adaptation.hpp +0 -1082
  551. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/context.hpp +0 -193
  552. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/context_as.hpp +0 -192
  553. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/executor.hpp +0 -118
  554. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/impl/bad_executor.ipp +0 -42
  555. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/invocable_archetype.hpp +0 -45
  556. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/mapping.hpp +0 -1004
  557. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/occupancy.hpp +0 -186
  558. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/outstanding_work.hpp +0 -755
  559. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/prefer_only.hpp +0 -330
  560. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/relationship.hpp +0 -753
  561. data/src/cxx_supportlib/vendor-modified/boost/asio/execution.hpp +0 -33
  562. data/src/cxx_supportlib/vendor-modified/boost/asio/execution_context.hpp +0 -390
  563. data/src/cxx_supportlib/vendor-modified/boost/asio/executor.hpp +0 -365
  564. data/src/cxx_supportlib/vendor-modified/boost/asio/executor_work_guard.hpp +0 -364
  565. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/append.hpp +0 -38
  566. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/as_single.hpp +0 -134
  567. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/as_tuple.hpp +0 -38
  568. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/awaitable_operators.hpp +0 -538
  569. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/basic_channel.hpp +0 -516
  570. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/basic_concurrent_channel.hpp +0 -516
  571. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/cancellation_condition.hpp +0 -154
  572. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/channel.hpp +0 -72
  573. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/channel_error.hpp +0 -88
  574. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/channel_traits.hpp +0 -303
  575. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/co_composed.hpp +0 -35
  576. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/co_spawn.hpp +0 -189
  577. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/concurrent_channel.hpp +0 -72
  578. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/coro.hpp +0 -295
  579. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/coro_traits.hpp +0 -230
  580. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/deferred.hpp +0 -38
  581. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_operation.hpp +0 -363
  582. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_receive_op.hpp +0 -128
  583. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_send_functions.hpp +0 -202
  584. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_send_op.hpp +0 -149
  585. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_service.hpp +0 -681
  586. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/coro_completion_handler.hpp +0 -171
  587. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/coro_promise_allocator.hpp +0 -142
  588. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/has_signature.hpp +0 -56
  589. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/impl/channel_service.hpp +0 -625
  590. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/partial_promise.hpp +0 -199
  591. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/as_single.hpp +0 -183
  592. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/channel_error.ipp +0 -63
  593. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/coro.hpp +0 -1224
  594. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/parallel_group.hpp +0 -790
  595. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/promise.hpp +0 -257
  596. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/use_coro.hpp +0 -216
  597. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/use_promise.hpp +0 -68
  598. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/parallel_group.hpp +0 -457
  599. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/prepend.hpp +0 -38
  600. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/promise.hpp +0 -226
  601. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/use_coro.hpp +0 -191
  602. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/use_promise.hpp +0 -113
  603. data/src/cxx_supportlib/vendor-modified/boost/asio/file_base.hpp +0 -168
  604. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/basic_endpoint.hpp +0 -191
  605. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/datagram_protocol.hpp +0 -125
  606. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/detail/endpoint.hpp +0 -135
  607. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/detail/impl/endpoint.ipp +0 -112
  608. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/raw_protocol.hpp +0 -123
  609. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/seq_packet_protocol.hpp +0 -124
  610. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/stream_protocol.hpp +0 -129
  611. data/src/cxx_supportlib/vendor-modified/boost/asio/handler_continuation_hook.hpp +0 -56
  612. data/src/cxx_supportlib/vendor-modified/boost/asio/high_resolution_timer.hpp +0 -41
  613. data/src/cxx_supportlib/vendor-modified/boost/asio/immediate.hpp +0 -144
  614. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/any_completion_executor.ipp +0 -128
  615. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/any_io_executor.ipp +0 -136
  616. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/append.hpp +0 -171
  617. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/as_tuple.hpp +0 -278
  618. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/awaitable.hpp +0 -1198
  619. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_read_stream.hpp +0 -406
  620. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_write_stream.hpp +0 -386
  621. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/cancel_after.hpp +0 -270
  622. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/cancel_at.hpp +0 -270
  623. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/cancellation_signal.ipp +0 -98
  624. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/co_spawn.hpp +0 -459
  625. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect.hpp +0 -705
  626. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect_pipe.hpp +0 -75
  627. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect_pipe.ipp +0 -151
  628. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/consign.hpp +0 -146
  629. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/deferred.hpp +0 -149
  630. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/detached.hpp +0 -79
  631. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/error.ipp +0 -130
  632. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/execution_context.hpp +0 -79
  633. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/execution_context.ipp +0 -84
  634. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/executor.hpp +0 -319
  635. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/executor.ipp +0 -45
  636. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_context.hpp +0 -435
  637. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_context.ipp +0 -178
  638. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/multiple_exceptions.ipp +0 -47
  639. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/prepend.hpp +0 -172
  640. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read.hpp +0 -904
  641. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_at.hpp +0 -564
  642. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_until.hpp +0 -2670
  643. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/redirect_error.hpp +0 -289
  644. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/serial_port_base.hpp +0 -61
  645. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/serial_port_base.ipp +0 -556
  646. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/spawn.hpp +0 -1402
  647. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/src.hpp +0 -93
  648. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/system_context.hpp +0 -36
  649. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/system_context.ipp +0 -94
  650. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/system_executor.hpp +0 -181
  651. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/thread_pool.hpp +0 -279
  652. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/thread_pool.ipp +0 -144
  653. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/use_awaitable.hpp +0 -303
  654. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/use_future.hpp +0 -709
  655. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write.hpp +0 -782
  656. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write_at.hpp +0 -482
  657. data/src/cxx_supportlib/vendor-modified/boost/asio/io_context.hpp +0 -1507
  658. data/src/cxx_supportlib/vendor-modified/boost/asio/io_context_strand.hpp +0 -398
  659. data/src/cxx_supportlib/vendor-modified/boost/asio/io_service.hpp +0 -35
  660. data/src/cxx_supportlib/vendor-modified/boost/asio/io_service_strand.hpp +0 -20
  661. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address.hpp +0 -283
  662. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4.hpp +0 -423
  663. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4_iterator.hpp +0 -158
  664. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4_range.hpp +0 -130
  665. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6.hpp +0 -409
  666. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6_iterator.hpp +0 -180
  667. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6_range.hpp +0 -126
  668. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/bad_address_cast.hpp +0 -65
  669. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_endpoint.hpp +0 -284
  670. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver.hpp +0 -1114
  671. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_entry.hpp +0 -115
  672. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_iterator.hpp +0 -190
  673. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_query.hpp +0 -262
  674. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_results.hpp +0 -309
  675. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/endpoint.hpp +0 -143
  676. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/impl/endpoint.ipp +0 -197
  677. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/socket_option.hpp +0 -568
  678. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/host_name.hpp +0 -44
  679. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/icmp.hpp +0 -117
  680. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address.hpp +0 -69
  681. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address.ipp +0 -237
  682. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v4.hpp +0 -69
  683. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v4.ipp +0 -208
  684. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.hpp +0 -69
  685. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.ipp +0 -344
  686. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/basic_endpoint.hpp +0 -45
  687. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/host_name.ipp +0 -56
  688. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v4.hpp +0 -56
  689. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v4.ipp +0 -220
  690. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v6.hpp +0 -55
  691. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v6.ipp +0 -189
  692. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/multicast.hpp +0 -193
  693. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/network_v4.hpp +0 -259
  694. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/network_v6.hpp +0 -233
  695. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_base.hpp +0 -131
  696. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_query_base.hpp +0 -45
  697. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/tcp.hpp +0 -157
  698. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/udp.hpp +0 -113
  699. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/unicast.hpp +0 -72
  700. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/v6_only.hpp +0 -71
  701. data/src/cxx_supportlib/vendor-modified/boost/asio/is_applicable_property.hpp +0 -63
  702. data/src/cxx_supportlib/vendor-modified/boost/asio/is_contiguous_iterator.hpp +0 -47
  703. data/src/cxx_supportlib/vendor-modified/boost/asio/is_executor.hpp +0 -48
  704. data/src/cxx_supportlib/vendor-modified/boost/asio/is_read_buffered.hpp +0 -61
  705. data/src/cxx_supportlib/vendor-modified/boost/asio/is_write_buffered.hpp +0 -61
  706. data/src/cxx_supportlib/vendor-modified/boost/asio/local/basic_endpoint.hpp +0 -245
  707. data/src/cxx_supportlib/vendor-modified/boost/asio/local/connect_pair.hpp +0 -103
  708. data/src/cxx_supportlib/vendor-modified/boost/asio/local/datagram_protocol.hpp +0 -82
  709. data/src/cxx_supportlib/vendor-modified/boost/asio/local/detail/endpoint.hpp +0 -141
  710. data/src/cxx_supportlib/vendor-modified/boost/asio/local/detail/impl/endpoint.ipp +0 -133
  711. data/src/cxx_supportlib/vendor-modified/boost/asio/local/seq_packet_protocol.hpp +0 -86
  712. data/src/cxx_supportlib/vendor-modified/boost/asio/local/stream_protocol.hpp +0 -92
  713. data/src/cxx_supportlib/vendor-modified/boost/asio/multiple_exceptions.hpp +0 -54
  714. data/src/cxx_supportlib/vendor-modified/boost/asio/packaged_task.hpp +0 -68
  715. data/src/cxx_supportlib/vendor-modified/boost/asio/placeholders.hpp +0 -83
  716. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_descriptor.hpp +0 -775
  717. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_stream_descriptor.hpp +0 -561
  718. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/descriptor.hpp +0 -39
  719. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/descriptor_base.hpp +0 -92
  720. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/stream_descriptor.hpp +0 -39
  721. data/src/cxx_supportlib/vendor-modified/boost/asio/post.hpp +0 -215
  722. data/src/cxx_supportlib/vendor-modified/boost/asio/prefer.hpp +0 -581
  723. data/src/cxx_supportlib/vendor-modified/boost/asio/prepend.hpp +0 -68
  724. data/src/cxx_supportlib/vendor-modified/boost/asio/query.hpp +0 -315
  725. data/src/cxx_supportlib/vendor-modified/boost/asio/random_access_file.hpp +0 -37
  726. data/src/cxx_supportlib/vendor-modified/boost/asio/read.hpp +0 -1549
  727. data/src/cxx_supportlib/vendor-modified/boost/asio/read_at.hpp +0 -830
  728. data/src/cxx_supportlib/vendor-modified/boost/asio/read_until.hpp +0 -3204
  729. data/src/cxx_supportlib/vendor-modified/boost/asio/readable_pipe.hpp +0 -37
  730. data/src/cxx_supportlib/vendor-modified/boost/asio/recycling_allocator.hpp +0 -140
  731. data/src/cxx_supportlib/vendor-modified/boost/asio/redirect_error.hpp +0 -106
  732. data/src/cxx_supportlib/vendor-modified/boost/asio/registered_buffer.hpp +0 -346
  733. data/src/cxx_supportlib/vendor-modified/boost/asio/require.hpp +0 -437
  734. data/src/cxx_supportlib/vendor-modified/boost/asio/require_concept.hpp +0 -347
  735. data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port.hpp +0 -38
  736. data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port_base.hpp +0 -169
  737. data/src/cxx_supportlib/vendor-modified/boost/asio/signal_set.hpp +0 -30
  738. data/src/cxx_supportlib/vendor-modified/boost/asio/signal_set_base.hpp +0 -173
  739. data/src/cxx_supportlib/vendor-modified/boost/asio/socket_base.hpp +0 -561
  740. data/src/cxx_supportlib/vendor-modified/boost/asio/spawn.hpp +0 -873
  741. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context.hpp +0 -764
  742. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context_base.hpp +0 -211
  743. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/buffered_handshake_op.hpp +0 -121
  744. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/engine.hpp +0 -171
  745. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/handshake_op.hpp +0 -69
  746. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/engine.ipp +0 -379
  747. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/openssl_init.ipp +0 -171
  748. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/io.hpp +0 -378
  749. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/openssl_init.hpp +0 -103
  750. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/openssl_types.hpp +0 -34
  751. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/password_callback.hpp +0 -68
  752. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/read_op.hpp +0 -74
  753. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/shutdown_op.hpp +0 -71
  754. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/stream_core.hpp +0 -219
  755. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/verify_callback.hpp +0 -64
  756. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/write_op.hpp +0 -78
  757. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/error.hpp +0 -129
  758. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/host_name_verification.hpp +0 -92
  759. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.hpp +0 -69
  760. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.ipp +0 -1324
  761. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/error.ipp +0 -126
  762. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/host_name_verification.ipp +0 -75
  763. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/rfc2818_verification.ipp +0 -166
  764. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/src.hpp +0 -29
  765. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/rfc2818_verification.hpp +0 -100
  766. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream.hpp +0 -1044
  767. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream_base.hpp +0 -54
  768. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/verify_context.hpp +0 -69
  769. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/verify_mode.hpp +0 -65
  770. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl.hpp +0 -28
  771. data/src/cxx_supportlib/vendor-modified/boost/asio/static_thread_pool.hpp +0 -33
  772. data/src/cxx_supportlib/vendor-modified/boost/asio/steady_timer.hpp +0 -39
  773. data/src/cxx_supportlib/vendor-modified/boost/asio/strand.hpp +0 -559
  774. data/src/cxx_supportlib/vendor-modified/boost/asio/stream_file.hpp +0 -37
  775. data/src/cxx_supportlib/vendor-modified/boost/asio/streambuf.hpp +0 -35
  776. data/src/cxx_supportlib/vendor-modified/boost/asio/system_context.hpp +0 -92
  777. data/src/cxx_supportlib/vendor-modified/boost/asio/system_executor.hpp +0 -673
  778. data/src/cxx_supportlib/vendor-modified/boost/asio/system_timer.hpp +0 -39
  779. data/src/cxx_supportlib/vendor-modified/boost/asio/this_coro.hpp +0 -269
  780. data/src/cxx_supportlib/vendor-modified/boost/asio/thread_pool.hpp +0 -965
  781. data/src/cxx_supportlib/vendor-modified/boost/asio/time_traits.hpp +0 -88
  782. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/equality_comparable.hpp +0 -102
  783. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/execute_member.hpp +0 -106
  784. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/prefer_free.hpp +0 -106
  785. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/prefer_member.hpp +0 -106
  786. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/query_free.hpp +0 -106
  787. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/query_member.hpp +0 -106
  788. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/query_static_constexpr_member.hpp +0 -103
  789. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_concept_free.hpp +0 -106
  790. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_concept_member.hpp +0 -106
  791. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_free.hpp +0 -106
  792. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_member.hpp +0 -106
  793. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/static_query.hpp +0 -104
  794. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/static_require.hpp +0 -117
  795. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/static_require_concept.hpp +0 -118
  796. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/buffer.hpp +0 -24
  797. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/executor.hpp +0 -35
  798. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/internet.hpp +0 -40
  799. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/io_context.hpp +0 -20
  800. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/net.hpp +0 -26
  801. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/netfwd.hpp +0 -238
  802. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/socket.hpp +0 -27
  803. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/timer.hpp +0 -26
  804. data/src/cxx_supportlib/vendor-modified/boost/asio/unyield.hpp +0 -21
  805. data/src/cxx_supportlib/vendor-modified/boost/asio/use_awaitable.hpp +0 -163
  806. data/src/cxx_supportlib/vendor-modified/boost/asio/use_future.hpp +0 -161
  807. data/src/cxx_supportlib/vendor-modified/boost/asio/uses_executor.hpp +0 -69
  808. data/src/cxx_supportlib/vendor-modified/boost/asio/version.hpp +0 -23
  809. data/src/cxx_supportlib/vendor-modified/boost/asio/wait_traits.hpp +0 -58
  810. data/src/cxx_supportlib/vendor-modified/boost/asio/writable_pipe.hpp +0 -37
  811. data/src/cxx_supportlib/vendor-modified/boost/asio/write.hpp +0 -1528
  812. data/src/cxx_supportlib/vendor-modified/boost/asio/write_at.hpp +0 -843
  813. data/src/cxx_supportlib/vendor-modified/boost/asio/yield.hpp +0 -23
  814. data/src/cxx_supportlib/vendor-modified/boost/asio.hpp +0 -195
  815. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/old_optional_implementation.hpp +0 -1059
  816. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/operator_bool.hpp +0 -64
  817. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/requires_cxx11.hpp +0 -23
  818. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_forward.hpp +0 -52
  819. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_nullptr_t.hpp +0 -45
  820. data/src/cxx_supportlib/vendor-modified/websocketpp/COPYING +0 -145
  821. data/src/cxx_supportlib/vendor-modified/websocketpp/changelog.md +0 -444
  822. data/src/cxx_supportlib/vendor-modified/websocketpp/readme.md +0 -49
  823. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/base64/base64.hpp +0 -178
  824. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/client.hpp +0 -33
  825. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/close.hpp +0 -353
  826. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/common/asio.hpp +0 -141
  827. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/common/asio_ssl.hpp +0 -39
  828. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/common/chrono.hpp +0 -68
  829. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/common/connection_hdl.hpp +0 -52
  830. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/common/cpp11.hpp +0 -162
  831. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/common/functional.hpp +0 -100
  832. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/common/md5.hpp +0 -448
  833. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/common/memory.hpp +0 -88
  834. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/common/network.hpp +0 -106
  835. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/common/platforms.hpp +0 -46
  836. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/common/random.hpp +0 -82
  837. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/common/regex.hpp +0 -59
  838. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/common/stdint.hpp +0 -73
  839. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/common/system_error.hpp +0 -84
  840. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/common/thread.hpp +0 -88
  841. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/common/time.hpp +0 -56
  842. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/common/type_traits.hpp +0 -65
  843. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/concurrency/basic.hpp +0 -46
  844. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/concurrency/none.hpp +0 -80
  845. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/config/asio.hpp +0 -77
  846. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/config/asio_client.hpp +0 -77
  847. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/config/asio_no_tls.hpp +0 -73
  848. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/config/asio_no_tls_client.hpp +0 -73
  849. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/config/boost_config.hpp +0 -72
  850. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/config/core.hpp +0 -297
  851. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/config/core_client.hpp +0 -294
  852. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/config/debug.hpp +0 -286
  853. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/config/debug_asio.hpp +0 -77
  854. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/config/debug_asio_no_tls.hpp +0 -73
  855. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/config/minimal_client.hpp +0 -72
  856. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/config/minimal_server.hpp +0 -312
  857. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/connection.hpp +0 -1642
  858. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/connection_base.hpp +0 -38
  859. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/endpoint.hpp +0 -700
  860. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/endpoint_base.hpp +0 -38
  861. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/error.hpp +0 -277
  862. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/extensions/extension.hpp +0 -102
  863. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/extensions/permessage_deflate/disabled.hpp +0 -129
  864. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/extensions/permessage_deflate/enabled.hpp +0 -817
  865. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/frame.hpp +0 -853
  866. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/http/constants.hpp +0 -308
  867. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/http/impl/parser.hpp +0 -200
  868. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/http/impl/request.hpp +0 -191
  869. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/http/impl/response.hpp +0 -266
  870. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/http/parser.hpp +0 -629
  871. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/http/request.hpp +0 -124
  872. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/http/response.hpp +0 -188
  873. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/impl/connection_impl.hpp +0 -2375
  874. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/impl/endpoint_impl.hpp +0 -269
  875. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/impl/utilities_impl.hpp +0 -87
  876. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/logger/basic.hpp +0 -199
  877. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/logger/levels.hpp +0 -203
  878. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/logger/stub.hpp +0 -119
  879. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/logger/syslog.hpp +0 -146
  880. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/message_buffer/alloc.hpp +0 -105
  881. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/message_buffer/message.hpp +0 -340
  882. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/message_buffer/pool.hpp +0 -229
  883. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/processors/base.hpp +0 -299
  884. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/processors/hybi00.hpp +0 -462
  885. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/processors/hybi07.hpp +0 -78
  886. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/processors/hybi08.hpp +0 -83
  887. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/processors/hybi13.hpp +0 -1072
  888. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/processors/processor.hpp +0 -407
  889. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/random/none.hpp +0 -60
  890. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/random/random_device.hpp +0 -80
  891. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/roles/client_endpoint.hpp +0 -173
  892. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/roles/server_endpoint.hpp +0 -195
  893. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/server.hpp +0 -33
  894. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/sha1/sha1.hpp +0 -189
  895. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/transport/asio/base.hpp +0 -232
  896. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/transport/asio/connection.hpp +0 -1197
  897. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/transport/asio/endpoint.hpp +0 -1182
  898. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/transport/asio/security/base.hpp +0 -159
  899. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/transport/asio/security/none.hpp +0 -372
  900. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/transport/asio/security/tls.hpp +0 -474
  901. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/transport/base/connection.hpp +0 -238
  902. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/transport/base/endpoint.hpp +0 -77
  903. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/transport/debug/base.hpp +0 -104
  904. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/transport/debug/connection.hpp +0 -412
  905. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/transport/debug/endpoint.hpp +0 -140
  906. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/transport/iostream/base.hpp +0 -133
  907. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/transport/iostream/connection.hpp +0 -714
  908. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/transport/iostream/endpoint.hpp +0 -222
  909. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/transport/stub/base.hpp +0 -95
  910. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/transport/stub/connection.hpp +0 -286
  911. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/transport/stub/endpoint.hpp +0 -140
  912. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/uri.hpp +0 -356
  913. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/utf8_validator.hpp +0 -154
  914. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/utilities.hpp +0 -180
  915. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/version.hpp +0 -61
@@ -1,2755 +0,0 @@
1
- //
2
- // buffer.hpp
3
- // ~~~~~~~~~~
4
- //
5
- // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6
- //
7
- // Distributed under the Boost Software License, Version 1.0. (See accompanying
8
- // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9
- //
10
-
11
- #ifndef BOOST_ASIO_BUFFER_HPP
12
- #define BOOST_ASIO_BUFFER_HPP
13
-
14
- #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15
- # pragma once
16
- #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17
-
18
- #include <boost/asio/detail/config.hpp>
19
- #include <cstddef>
20
- #include <cstring>
21
- #include <limits>
22
- #include <stdexcept>
23
- #include <string>
24
- #include <vector>
25
- #include <boost/asio/detail/array_fwd.hpp>
26
- #include <boost/asio/detail/memory.hpp>
27
- #include <boost/asio/detail/string_view.hpp>
28
- #include <boost/asio/detail/throw_exception.hpp>
29
- #include <boost/asio/detail/type_traits.hpp>
30
- #include <boost/asio/is_contiguous_iterator.hpp>
31
-
32
- #if defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC >= 1700)
33
- # if defined(_HAS_ITERATOR_DEBUGGING) && (_HAS_ITERATOR_DEBUGGING != 0)
34
- # if !defined(BOOST_ASIO_DISABLE_BUFFER_DEBUGGING)
35
- # define BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
36
- # endif // !defined(BOOST_ASIO_DISABLE_BUFFER_DEBUGGING)
37
- # endif // defined(_HAS_ITERATOR_DEBUGGING)
38
- #endif // defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC >= 1700)
39
-
40
- #if defined(__GNUC__)
41
- # if defined(_GLIBCXX_DEBUG)
42
- # if !defined(BOOST_ASIO_DISABLE_BUFFER_DEBUGGING)
43
- # define BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
44
- # endif // !defined(BOOST_ASIO_DISABLE_BUFFER_DEBUGGING)
45
- # endif // defined(_GLIBCXX_DEBUG)
46
- #endif // defined(__GNUC__)
47
-
48
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
49
- # include <boost/asio/detail/functional.hpp>
50
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
51
-
52
- #include <boost/asio/detail/push_options.hpp>
53
-
54
- namespace boost {
55
- namespace asio {
56
-
57
- class mutable_buffer;
58
- class const_buffer;
59
-
60
- /// Holds a buffer that can be modified.
61
- /**
62
- * The mutable_buffer class provides a safe representation of a buffer that can
63
- * be modified. It does not own the underlying data, and so is cheap to copy or
64
- * assign.
65
- *
66
- * @par Accessing Buffer Contents
67
- *
68
- * The contents of a buffer may be accessed using the @c data() and @c size()
69
- * member functions:
70
- *
71
- * @code boost::asio::mutable_buffer b1 = ...;
72
- * std::size_t s1 = b1.size();
73
- * unsigned char* p1 = static_cast<unsigned char*>(b1.data());
74
- * @endcode
75
- *
76
- * The @c data() member function permits violations of type safety, so uses of
77
- * it in application code should be carefully considered.
78
- */
79
- class mutable_buffer
80
- {
81
- public:
82
- /// Construct an empty buffer.
83
- mutable_buffer() noexcept
84
- : data_(0),
85
- size_(0)
86
- {
87
- }
88
-
89
- /// Construct a buffer to represent a given memory range.
90
- mutable_buffer(void* data, std::size_t size) noexcept
91
- : data_(data),
92
- size_(size)
93
- {
94
- }
95
-
96
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
97
- mutable_buffer(void* data, std::size_t size,
98
- boost::asio::detail::function<void()> debug_check)
99
- : data_(data),
100
- size_(size),
101
- debug_check_(debug_check)
102
- {
103
- }
104
-
105
- const boost::asio::detail::function<void()>& get_debug_check() const
106
- {
107
- return debug_check_;
108
- }
109
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
110
-
111
- /// Get a pointer to the beginning of the memory range.
112
- void* data() const noexcept
113
- {
114
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
115
- if (size_ && debug_check_)
116
- debug_check_();
117
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
118
- return data_;
119
- }
120
-
121
- /// Get the size of the memory range.
122
- std::size_t size() const noexcept
123
- {
124
- return size_;
125
- }
126
-
127
- /// Move the start of the buffer by the specified number of bytes.
128
- mutable_buffer& operator+=(std::size_t n) noexcept
129
- {
130
- std::size_t offset = n < size_ ? n : size_;
131
- data_ = static_cast<char*>(data_) + offset;
132
- size_ -= offset;
133
- return *this;
134
- }
135
-
136
- private:
137
- void* data_;
138
- std::size_t size_;
139
-
140
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
141
- boost::asio::detail::function<void()> debug_check_;
142
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
143
- };
144
-
145
- #if !defined(BOOST_ASIO_NO_DEPRECATED)
146
-
147
- /// (Deprecated: Use mutable_buffer.) Adapts a single modifiable buffer so that
148
- /// it meets the requirements of the MutableBufferSequence concept.
149
- class mutable_buffers_1
150
- : public mutable_buffer
151
- {
152
- public:
153
- /// The type for each element in the list of buffers.
154
- typedef mutable_buffer value_type;
155
-
156
- /// A random-access iterator type that may be used to read elements.
157
- typedef const mutable_buffer* const_iterator;
158
-
159
- /// Construct to represent a given memory range.
160
- mutable_buffers_1(void* data, std::size_t size) noexcept
161
- : mutable_buffer(data, size)
162
- {
163
- }
164
-
165
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
166
- mutable_buffers_1(void* data, std::size_t size,
167
- boost::asio::detail::function<void()> debug_check)
168
- : mutable_buffer(data, size, debug_check)
169
- {
170
- }
171
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
172
-
173
- /// Construct to represent a single modifiable buffer.
174
- explicit mutable_buffers_1(const mutable_buffer& b) noexcept
175
- : mutable_buffer(b)
176
- {
177
- }
178
-
179
- /// Get a random-access iterator to the first element.
180
- const_iterator begin() const noexcept
181
- {
182
- return this;
183
- }
184
-
185
- /// Get a random-access iterator for one past the last element.
186
- const_iterator end() const noexcept
187
- {
188
- return begin() + 1;
189
- }
190
- };
191
-
192
- #endif // !defined(BOOST_ASIO_NO_DEPRECATED)
193
-
194
- /// Holds a buffer that cannot be modified.
195
- /**
196
- * The const_buffer class provides a safe representation of a buffer that cannot
197
- * be modified. It does not own the underlying data, and so is cheap to copy or
198
- * assign.
199
- *
200
- * @par Accessing Buffer Contents
201
- *
202
- * The contents of a buffer may be accessed using the @c data() and @c size()
203
- * member functions:
204
- *
205
- * @code boost::asio::const_buffer b1 = ...;
206
- * std::size_t s1 = b1.size();
207
- * const unsigned char* p1 = static_cast<const unsigned char*>(b1.data());
208
- * @endcode
209
- *
210
- * The @c data() member function permits violations of type safety, so uses of
211
- * it in application code should be carefully considered.
212
- */
213
- class const_buffer
214
- {
215
- public:
216
- /// Construct an empty buffer.
217
- const_buffer() noexcept
218
- : data_(0),
219
- size_(0)
220
- {
221
- }
222
-
223
- /// Construct a buffer to represent a given memory range.
224
- const_buffer(const void* data, std::size_t size) noexcept
225
- : data_(data),
226
- size_(size)
227
- {
228
- }
229
-
230
- /// Construct a non-modifiable buffer from a modifiable one.
231
- const_buffer(const mutable_buffer& b) noexcept
232
- : data_(b.data()),
233
- size_(b.size())
234
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
235
- , debug_check_(b.get_debug_check())
236
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
237
- {
238
- }
239
-
240
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
241
- const_buffer(const void* data, std::size_t size,
242
- boost::asio::detail::function<void()> debug_check)
243
- : data_(data),
244
- size_(size),
245
- debug_check_(debug_check)
246
- {
247
- }
248
-
249
- const boost::asio::detail::function<void()>& get_debug_check() const
250
- {
251
- return debug_check_;
252
- }
253
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
254
-
255
- /// Get a pointer to the beginning of the memory range.
256
- const void* data() const noexcept
257
- {
258
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
259
- if (size_ && debug_check_)
260
- debug_check_();
261
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
262
- return data_;
263
- }
264
-
265
- /// Get the size of the memory range.
266
- std::size_t size() const noexcept
267
- {
268
- return size_;
269
- }
270
-
271
- /// Move the start of the buffer by the specified number of bytes.
272
- const_buffer& operator+=(std::size_t n) noexcept
273
- {
274
- std::size_t offset = n < size_ ? n : size_;
275
- data_ = static_cast<const char*>(data_) + offset;
276
- size_ -= offset;
277
- return *this;
278
- }
279
-
280
- private:
281
- const void* data_;
282
- std::size_t size_;
283
-
284
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
285
- boost::asio::detail::function<void()> debug_check_;
286
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
287
- };
288
-
289
- #if !defined(BOOST_ASIO_NO_DEPRECATED)
290
-
291
- /// (Deprecated: Use const_buffer.) Adapts a single non-modifiable buffer so
292
- /// that it meets the requirements of the ConstBufferSequence concept.
293
- class const_buffers_1
294
- : public const_buffer
295
- {
296
- public:
297
- /// The type for each element in the list of buffers.
298
- typedef const_buffer value_type;
299
-
300
- /// A random-access iterator type that may be used to read elements.
301
- typedef const const_buffer* const_iterator;
302
-
303
- /// Construct to represent a given memory range.
304
- const_buffers_1(const void* data, std::size_t size) noexcept
305
- : const_buffer(data, size)
306
- {
307
- }
308
-
309
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
310
- const_buffers_1(const void* data, std::size_t size,
311
- boost::asio::detail::function<void()> debug_check)
312
- : const_buffer(data, size, debug_check)
313
- {
314
- }
315
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
316
-
317
- /// Construct to represent a single non-modifiable buffer.
318
- explicit const_buffers_1(const const_buffer& b) noexcept
319
- : const_buffer(b)
320
- {
321
- }
322
-
323
- /// Get a random-access iterator to the first element.
324
- const_iterator begin() const noexcept
325
- {
326
- return this;
327
- }
328
-
329
- /// Get a random-access iterator for one past the last element.
330
- const_iterator end() const noexcept
331
- {
332
- return begin() + 1;
333
- }
334
- };
335
-
336
- #endif // !defined(BOOST_ASIO_NO_DEPRECATED)
337
-
338
- /// (Deprecated: Use the socket/descriptor wait() and async_wait() member
339
- /// functions.) An implementation of both the ConstBufferSequence and
340
- /// MutableBufferSequence concepts to represent a null buffer sequence.
341
- class null_buffers
342
- {
343
- public:
344
- /// The type for each element in the list of buffers.
345
- typedef mutable_buffer value_type;
346
-
347
- /// A random-access iterator type that may be used to read elements.
348
- typedef const mutable_buffer* const_iterator;
349
-
350
- /// Get a random-access iterator to the first element.
351
- const_iterator begin() const noexcept
352
- {
353
- return &buf_;
354
- }
355
-
356
- /// Get a random-access iterator for one past the last element.
357
- const_iterator end() const noexcept
358
- {
359
- return &buf_;
360
- }
361
-
362
- private:
363
- mutable_buffer buf_;
364
- };
365
-
366
- /** @defgroup buffer_sequence_begin boost::asio::buffer_sequence_begin
367
- *
368
- * @brief The boost::asio::buffer_sequence_begin function returns an iterator
369
- * pointing to the first element in a buffer sequence.
370
- */
371
- /*@{*/
372
-
373
- /// Get an iterator to the first element in a buffer sequence.
374
- template <typename MutableBuffer>
375
- inline const mutable_buffer* buffer_sequence_begin(const MutableBuffer& b,
376
- constraint_t<
377
- is_convertible<const MutableBuffer*, const mutable_buffer*>::value
378
- > = 0) noexcept
379
- {
380
- return static_cast<const mutable_buffer*>(detail::addressof(b));
381
- }
382
-
383
- /// Get an iterator to the first element in a buffer sequence.
384
- template <typename ConstBuffer>
385
- inline const const_buffer* buffer_sequence_begin(const ConstBuffer& b,
386
- constraint_t<
387
- is_convertible<const ConstBuffer*, const const_buffer*>::value
388
- > = 0) noexcept
389
- {
390
- return static_cast<const const_buffer*>(detail::addressof(b));
391
- }
392
-
393
- /// Get an iterator to the first element in a buffer sequence.
394
- template <typename C>
395
- inline auto buffer_sequence_begin(C& c,
396
- constraint_t<
397
- !is_convertible<const C*, const mutable_buffer*>::value
398
- && !is_convertible<const C*, const const_buffer*>::value
399
- > = 0) noexcept -> decltype(c.begin())
400
- {
401
- return c.begin();
402
- }
403
-
404
- /// Get an iterator to the first element in a buffer sequence.
405
- template <typename C>
406
- inline auto buffer_sequence_begin(const C& c,
407
- constraint_t<
408
- !is_convertible<const C*, const mutable_buffer*>::value
409
- && !is_convertible<const C*, const const_buffer*>::value
410
- > = 0) noexcept -> decltype(c.begin())
411
- {
412
- return c.begin();
413
- }
414
-
415
- /*@}*/
416
-
417
- /** @defgroup buffer_sequence_end boost::asio::buffer_sequence_end
418
- *
419
- * @brief The boost::asio::buffer_sequence_end function returns an iterator
420
- * pointing to one past the end element in a buffer sequence.
421
- */
422
- /*@{*/
423
-
424
- /// Get an iterator to one past the end element in a buffer sequence.
425
- template <typename MutableBuffer>
426
- inline const mutable_buffer* buffer_sequence_end(const MutableBuffer& b,
427
- constraint_t<
428
- is_convertible<const MutableBuffer*, const mutable_buffer*>::value
429
- > = 0) noexcept
430
- {
431
- return static_cast<const mutable_buffer*>(detail::addressof(b)) + 1;
432
- }
433
-
434
- /// Get an iterator to one past the end element in a buffer sequence.
435
- template <typename ConstBuffer>
436
- inline const const_buffer* buffer_sequence_end(const ConstBuffer& b,
437
- constraint_t<
438
- is_convertible<const ConstBuffer*, const const_buffer*>::value
439
- > = 0) noexcept
440
- {
441
- return static_cast<const const_buffer*>(detail::addressof(b)) + 1;
442
- }
443
-
444
- /// Get an iterator to one past the end element in a buffer sequence.
445
- template <typename C>
446
- inline auto buffer_sequence_end(C& c,
447
- constraint_t<
448
- !is_convertible<const C*, const mutable_buffer*>::value
449
- && !is_convertible<const C*, const const_buffer*>::value
450
- > = 0) noexcept -> decltype(c.end())
451
- {
452
- return c.end();
453
- }
454
-
455
- /// Get an iterator to one past the end element in a buffer sequence.
456
- template <typename C>
457
- inline auto buffer_sequence_end(const C& c,
458
- constraint_t<
459
- !is_convertible<const C*, const mutable_buffer*>::value
460
- && !is_convertible<const C*, const const_buffer*>::value
461
- > = 0) noexcept -> decltype(c.end())
462
- {
463
- return c.end();
464
- }
465
-
466
- /*@}*/
467
-
468
- namespace detail {
469
-
470
- // Tag types used to select appropriately optimised overloads.
471
- struct one_buffer {};
472
- struct multiple_buffers {};
473
-
474
- // Helper trait to detect single buffers.
475
- template <typename BufferSequence>
476
- struct buffer_sequence_cardinality :
477
- conditional_t<
478
- is_same<BufferSequence, mutable_buffer>::value
479
- #if !defined(BOOST_ASIO_NO_DEPRECATED)
480
- || is_same<BufferSequence, mutable_buffers_1>::value
481
- || is_same<BufferSequence, const_buffers_1>::value
482
- #endif // !defined(BOOST_ASIO_NO_DEPRECATED)
483
- || is_same<BufferSequence, const_buffer>::value,
484
- one_buffer, multiple_buffers> {};
485
-
486
- template <typename Iterator>
487
- inline std::size_t buffer_size(one_buffer,
488
- Iterator begin, Iterator) noexcept
489
- {
490
- return const_buffer(*begin).size();
491
- }
492
-
493
- template <typename Iterator>
494
- inline std::size_t buffer_size(multiple_buffers,
495
- Iterator begin, Iterator end) noexcept
496
- {
497
- std::size_t total_buffer_size = 0;
498
-
499
- Iterator iter = begin;
500
- for (; iter != end; ++iter)
501
- {
502
- const_buffer b(*iter);
503
- total_buffer_size += b.size();
504
- }
505
-
506
- return total_buffer_size;
507
- }
508
-
509
- } // namespace detail
510
-
511
- /// Get the total number of bytes in a buffer sequence.
512
- /**
513
- * The @c buffer_size function determines the total size of all buffers in the
514
- * buffer sequence, as if computed as follows:
515
- *
516
- * @code size_t total_size = 0;
517
- * auto i = boost::asio::buffer_sequence_begin(buffers);
518
- * auto end = boost::asio::buffer_sequence_end(buffers);
519
- * for (; i != end; ++i)
520
- * {
521
- * const_buffer b(*i);
522
- * total_size += b.size();
523
- * }
524
- * return total_size; @endcode
525
- *
526
- * The @c BufferSequence template parameter may meet either of the @c
527
- * ConstBufferSequence or @c MutableBufferSequence type requirements.
528
- */
529
- template <typename BufferSequence>
530
- inline std::size_t buffer_size(const BufferSequence& b) noexcept
531
- {
532
- return detail::buffer_size(
533
- detail::buffer_sequence_cardinality<BufferSequence>(),
534
- boost::asio::buffer_sequence_begin(b),
535
- boost::asio::buffer_sequence_end(b));
536
- }
537
-
538
- #if !defined(BOOST_ASIO_NO_DEPRECATED)
539
-
540
- /** @defgroup buffer_cast boost::asio::buffer_cast
541
- *
542
- * @brief (Deprecated: Use the @c data() member function.) The
543
- * boost::asio::buffer_cast function is used to obtain a pointer to the
544
- * underlying memory region associated with a buffer.
545
- *
546
- * @par Examples:
547
- *
548
- * To access the memory of a non-modifiable buffer, use:
549
- * @code boost::asio::const_buffer b1 = ...;
550
- * const unsigned char* p1 = boost::asio::buffer_cast<const unsigned char*>(b1);
551
- * @endcode
552
- *
553
- * To access the memory of a modifiable buffer, use:
554
- * @code boost::asio::mutable_buffer b2 = ...;
555
- * unsigned char* p2 = boost::asio::buffer_cast<unsigned char*>(b2);
556
- * @endcode
557
- *
558
- * The boost::asio::buffer_cast function permits violations of type safety, so
559
- * uses of it in application code should be carefully considered.
560
- */
561
- /*@{*/
562
-
563
- /// Cast a non-modifiable buffer to a specified pointer to POD type.
564
- template <typename PointerToPodType>
565
- inline PointerToPodType buffer_cast(const mutable_buffer& b) noexcept
566
- {
567
- return static_cast<PointerToPodType>(b.data());
568
- }
569
-
570
- /// Cast a non-modifiable buffer to a specified pointer to POD type.
571
- template <typename PointerToPodType>
572
- inline PointerToPodType buffer_cast(const const_buffer& b) noexcept
573
- {
574
- return static_cast<PointerToPodType>(b.data());
575
- }
576
-
577
- /*@}*/
578
-
579
- #endif // !defined(BOOST_ASIO_NO_DEPRECATED)
580
-
581
- /// Create a new modifiable buffer that is offset from the start of another.
582
- /**
583
- * @relates mutable_buffer
584
- */
585
- inline mutable_buffer operator+(const mutable_buffer& b,
586
- std::size_t n) noexcept
587
- {
588
- std::size_t offset = n < b.size() ? n : b.size();
589
- char* new_data = static_cast<char*>(b.data()) + offset;
590
- std::size_t new_size = b.size() - offset;
591
- return mutable_buffer(new_data, new_size
592
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
593
- , b.get_debug_check()
594
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
595
- );
596
- }
597
-
598
- /// Create a new modifiable buffer that is offset from the start of another.
599
- /**
600
- * @relates mutable_buffer
601
- */
602
- inline mutable_buffer operator+(std::size_t n,
603
- const mutable_buffer& b) noexcept
604
- {
605
- return b + n;
606
- }
607
-
608
- /// Create a new non-modifiable buffer that is offset from the start of another.
609
- /**
610
- * @relates const_buffer
611
- */
612
- inline const_buffer operator+(const const_buffer& b,
613
- std::size_t n) noexcept
614
- {
615
- std::size_t offset = n < b.size() ? n : b.size();
616
- const char* new_data = static_cast<const char*>(b.data()) + offset;
617
- std::size_t new_size = b.size() - offset;
618
- return const_buffer(new_data, new_size
619
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
620
- , b.get_debug_check()
621
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
622
- );
623
- }
624
-
625
- /// Create a new non-modifiable buffer that is offset from the start of another.
626
- /**
627
- * @relates const_buffer
628
- */
629
- inline const_buffer operator+(std::size_t n,
630
- const const_buffer& b) noexcept
631
- {
632
- return b + n;
633
- }
634
-
635
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
636
- namespace detail {
637
-
638
- template <typename Iterator>
639
- class buffer_debug_check
640
- {
641
- public:
642
- buffer_debug_check(Iterator iter)
643
- : iter_(iter)
644
- {
645
- }
646
-
647
- ~buffer_debug_check()
648
- {
649
- #if defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC == 1400)
650
- // MSVC 8's string iterator checking may crash in a std::string::iterator
651
- // object's destructor when the iterator points to an already-destroyed
652
- // std::string object, unless the iterator is cleared first.
653
- iter_ = Iterator();
654
- #endif // defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC == 1400)
655
- }
656
-
657
- void operator()()
658
- {
659
- (void)*iter_;
660
- }
661
-
662
- private:
663
- Iterator iter_;
664
- };
665
-
666
- } // namespace detail
667
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
668
-
669
- /** @defgroup buffer boost::asio::buffer
670
- *
671
- * @brief The boost::asio::buffer function is used to create a buffer object to
672
- * represent raw memory, an array of POD elements, a vector of POD elements,
673
- * or a std::string.
674
- *
675
- * A buffer object represents a contiguous region of memory as a 2-tuple
676
- * consisting of a pointer and size in bytes. A tuple of the form <tt>{void*,
677
- * size_t}</tt> specifies a mutable (modifiable) region of memory. Similarly, a
678
- * tuple of the form <tt>{const void*, size_t}</tt> specifies a const
679
- * (non-modifiable) region of memory. These two forms correspond to the classes
680
- * mutable_buffer and const_buffer, respectively. To mirror C++'s conversion
681
- * rules, a mutable_buffer is implicitly convertible to a const_buffer, and the
682
- * opposite conversion is not permitted.
683
- *
684
- * The simplest use case involves reading or writing a single buffer of a
685
- * specified size:
686
- *
687
- * @code sock.send(boost::asio::buffer(data, size)); @endcode
688
- *
689
- * In the above example, the return value of boost::asio::buffer meets the
690
- * requirements of the ConstBufferSequence concept so that it may be directly
691
- * passed to the socket's write function. A buffer created for modifiable
692
- * memory also meets the requirements of the MutableBufferSequence concept.
693
- *
694
- * An individual buffer may be created from a builtin array, std::vector,
695
- * std::array or boost::array of POD elements. This helps prevent buffer
696
- * overruns by automatically determining the size of the buffer:
697
- *
698
- * @code char d1[128];
699
- * size_t bytes_transferred = sock.receive(boost::asio::buffer(d1));
700
- *
701
- * std::vector<char> d2(128);
702
- * bytes_transferred = sock.receive(boost::asio::buffer(d2));
703
- *
704
- * std::array<char, 128> d3;
705
- * bytes_transferred = sock.receive(boost::asio::buffer(d3));
706
- *
707
- * boost::array<char, 128> d4;
708
- * bytes_transferred = sock.receive(boost::asio::buffer(d4)); @endcode
709
- *
710
- * In all three cases above, the buffers created are exactly 128 bytes long.
711
- * Note that a vector is @e never automatically resized when creating or using
712
- * a buffer. The buffer size is determined using the vector's <tt>size()</tt>
713
- * member function, and not its capacity.
714
- *
715
- * @par Accessing Buffer Contents
716
- *
717
- * The contents of a buffer may be accessed using the @c data() and @c size()
718
- * member functions:
719
- *
720
- * @code boost::asio::mutable_buffer b1 = ...;
721
- * std::size_t s1 = b1.size();
722
- * unsigned char* p1 = static_cast<unsigned char*>(b1.data());
723
- *
724
- * boost::asio::const_buffer b2 = ...;
725
- * std::size_t s2 = b2.size();
726
- * const void* p2 = b2.data(); @endcode
727
- *
728
- * The @c data() member function permits violations of type safety, so
729
- * uses of it in application code should be carefully considered.
730
- *
731
- * For convenience, a @ref buffer_size function is provided that works with
732
- * both buffers and buffer sequences (that is, types meeting the
733
- * ConstBufferSequence or MutableBufferSequence type requirements). In this
734
- * case, the function returns the total size of all buffers in the sequence.
735
- *
736
- * @par Buffer Copying
737
- *
738
- * The @ref buffer_copy function may be used to copy raw bytes between
739
- * individual buffers and buffer sequences.
740
- *
741
- * In particular, when used with the @ref buffer_size function, the @ref
742
- * buffer_copy function can be used to linearise a sequence of buffers. For
743
- * example:
744
- *
745
- * @code vector<const_buffer> buffers = ...;
746
- *
747
- * vector<unsigned char> data(boost::asio::buffer_size(buffers));
748
- * boost::asio::buffer_copy(boost::asio::buffer(data), buffers); @endcode
749
- *
750
- * Note that @ref buffer_copy is implemented in terms of @c memcpy, and
751
- * consequently it cannot be used to copy between overlapping memory regions.
752
- *
753
- * @par Buffer Invalidation
754
- *
755
- * A buffer object does not have any ownership of the memory it refers to. It
756
- * is the responsibility of the application to ensure the memory region remains
757
- * valid until it is no longer required for an I/O operation. When the memory
758
- * is no longer available, the buffer is said to have been invalidated.
759
- *
760
- * For the boost::asio::buffer overloads that accept an argument of type
761
- * std::vector, the buffer objects returned are invalidated by any vector
762
- * operation that also invalidates all references, pointers and iterators
763
- * referring to the elements in the sequence (C++ Std, 23.2.4)
764
- *
765
- * For the boost::asio::buffer overloads that accept an argument of type
766
- * std::basic_string, the buffer objects returned are invalidated according to
767
- * the rules defined for invalidation of references, pointers and iterators
768
- * referring to elements of the sequence (C++ Std, 21.3).
769
- *
770
- * @par Buffer Arithmetic
771
- *
772
- * Buffer objects may be manipulated using simple arithmetic in a safe way
773
- * which helps prevent buffer overruns. Consider an array initialised as
774
- * follows:
775
- *
776
- * @code boost::array<char, 6> a = { 'a', 'b', 'c', 'd', 'e' }; @endcode
777
- *
778
- * A buffer object @c b1 created using:
779
- *
780
- * @code b1 = boost::asio::buffer(a); @endcode
781
- *
782
- * represents the entire array, <tt>{ 'a', 'b', 'c', 'd', 'e' }</tt>. An
783
- * optional second argument to the boost::asio::buffer function may be used to
784
- * limit the size, in bytes, of the buffer:
785
- *
786
- * @code b2 = boost::asio::buffer(a, 3); @endcode
787
- *
788
- * such that @c b2 represents the data <tt>{ 'a', 'b', 'c' }</tt>. Even if the
789
- * size argument exceeds the actual size of the array, the size of the buffer
790
- * object created will be limited to the array size.
791
- *
792
- * An offset may be applied to an existing buffer to create a new one:
793
- *
794
- * @code b3 = b1 + 2; @endcode
795
- *
796
- * where @c b3 will set to represent <tt>{ 'c', 'd', 'e' }</tt>. If the offset
797
- * exceeds the size of the existing buffer, the newly created buffer will be
798
- * empty.
799
- *
800
- * Both an offset and size may be specified to create a buffer that corresponds
801
- * to a specific range of bytes within an existing buffer:
802
- *
803
- * @code b4 = boost::asio::buffer(b1 + 1, 3); @endcode
804
- *
805
- * so that @c b4 will refer to the bytes <tt>{ 'b', 'c', 'd' }</tt>.
806
- *
807
- * @par Buffers and Scatter-Gather I/O
808
- *
809
- * To read or write using multiple buffers (i.e. scatter-gather I/O), multiple
810
- * buffer objects may be assigned into a container that supports the
811
- * MutableBufferSequence (for read) or ConstBufferSequence (for write) concepts:
812
- *
813
- * @code
814
- * char d1[128];
815
- * std::vector<char> d2(128);
816
- * boost::array<char, 128> d3;
817
- *
818
- * boost::array<mutable_buffer, 3> bufs1 = {
819
- * boost::asio::buffer(d1),
820
- * boost::asio::buffer(d2),
821
- * boost::asio::buffer(d3) };
822
- * bytes_transferred = sock.receive(bufs1);
823
- *
824
- * std::vector<const_buffer> bufs2;
825
- * bufs2.push_back(boost::asio::buffer(d1));
826
- * bufs2.push_back(boost::asio::buffer(d2));
827
- * bufs2.push_back(boost::asio::buffer(d3));
828
- * bytes_transferred = sock.send(bufs2); @endcode
829
- *
830
- * @par Buffer Literals
831
- *
832
- * The `_buf` literal suffix, defined in namespace
833
- * <tt>boost::asio::buffer_literals</tt>, may be used to create @c const_buffer
834
- * objects from string, binary integer, and hexadecimal integer literals.
835
- * For example:
836
- *
837
- * @code
838
- * using namespace boost::asio::buffer_literals;
839
- *
840
- * boost::asio::const_buffer b1 = "hello"_buf;
841
- * boost::asio::const_buffer b2 = 0xdeadbeef_buf;
842
- * boost::asio::const_buffer b3 = 0x0123456789abcdef0123456789abcdef_buf;
843
- * boost::asio::const_buffer b4 = 0b1010101011001100_buf; @endcode
844
- *
845
- * Note that the memory associated with a buffer literal is valid for the
846
- * lifetime of the program. This means that the buffer can be safely used with
847
- * asynchronous operations.
848
- */
849
- /*@{*/
850
-
851
- #if defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
852
- # define BOOST_ASIO_MUTABLE_BUFFER mutable_buffer
853
- # define BOOST_ASIO_CONST_BUFFER const_buffer
854
- #else // defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
855
- # define BOOST_ASIO_MUTABLE_BUFFER mutable_buffers_1
856
- # define BOOST_ASIO_CONST_BUFFER const_buffers_1
857
- #endif // defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
858
-
859
- /// Create a new modifiable buffer from an existing buffer.
860
- /**
861
- * @returns <tt>mutable_buffer(b)</tt>.
862
- */
863
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_MUTABLE_BUFFER buffer(
864
- const mutable_buffer& b) noexcept
865
- {
866
- return BOOST_ASIO_MUTABLE_BUFFER(b);
867
- }
868
-
869
- /// Create a new modifiable buffer from an existing buffer.
870
- /**
871
- * @returns A mutable_buffer value equivalent to:
872
- * @code mutable_buffer(
873
- * b.data(),
874
- * min(b.size(), max_size_in_bytes)); @endcode
875
- */
876
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_MUTABLE_BUFFER buffer(
877
- const mutable_buffer& b,
878
- std::size_t max_size_in_bytes) noexcept
879
- {
880
- return BOOST_ASIO_MUTABLE_BUFFER(
881
- mutable_buffer(b.data(),
882
- b.size() < max_size_in_bytes
883
- ? b.size() : max_size_in_bytes
884
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
885
- , b.get_debug_check()
886
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
887
- ));
888
- }
889
-
890
- /// Create a new non-modifiable buffer from an existing buffer.
891
- /**
892
- * @returns <tt>const_buffer(b)</tt>.
893
- */
894
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
895
- const const_buffer& b) noexcept
896
- {
897
- return BOOST_ASIO_CONST_BUFFER(b);
898
- }
899
-
900
- /// Create a new non-modifiable buffer from an existing buffer.
901
- /**
902
- * @returns A const_buffer value equivalent to:
903
- * @code const_buffer(
904
- * b.data(),
905
- * min(b.size(), max_size_in_bytes)); @endcode
906
- */
907
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
908
- const const_buffer& b,
909
- std::size_t max_size_in_bytes) noexcept
910
- {
911
- return BOOST_ASIO_CONST_BUFFER(b.data(),
912
- b.size() < max_size_in_bytes
913
- ? b.size() : max_size_in_bytes
914
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
915
- , b.get_debug_check()
916
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
917
- );
918
- }
919
-
920
- /// Create a new modifiable buffer that represents the given memory range.
921
- /**
922
- * @returns <tt>mutable_buffer(data, size_in_bytes)</tt>.
923
- */
924
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_MUTABLE_BUFFER buffer(
925
- void* data, std::size_t size_in_bytes) noexcept
926
- {
927
- return BOOST_ASIO_MUTABLE_BUFFER(data, size_in_bytes);
928
- }
929
-
930
- /// Create a new non-modifiable buffer that represents the given memory range.
931
- /**
932
- * @returns <tt>const_buffer(data, size_in_bytes)</tt>.
933
- */
934
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
935
- const void* data, std::size_t size_in_bytes) noexcept
936
- {
937
- return BOOST_ASIO_CONST_BUFFER(data, size_in_bytes);
938
- }
939
-
940
- /// Create a new modifiable buffer that represents the given POD array.
941
- /**
942
- * @returns A mutable_buffer value equivalent to:
943
- * @code mutable_buffer(
944
- * static_cast<void*>(data),
945
- * N * sizeof(PodType)); @endcode
946
- */
947
- template <typename PodType, std::size_t N>
948
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_MUTABLE_BUFFER buffer(
949
- PodType (&data)[N]) noexcept
950
- {
951
- return BOOST_ASIO_MUTABLE_BUFFER(data, N * sizeof(PodType));
952
- }
953
-
954
- /// Create a new modifiable buffer that represents the given POD array.
955
- /**
956
- * @returns A mutable_buffer value equivalent to:
957
- * @code mutable_buffer(
958
- * static_cast<void*>(data),
959
- * min(N * sizeof(PodType), max_size_in_bytes)); @endcode
960
- */
961
- template <typename PodType, std::size_t N>
962
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_MUTABLE_BUFFER buffer(
963
- PodType (&data)[N],
964
- std::size_t max_size_in_bytes) noexcept
965
- {
966
- return BOOST_ASIO_MUTABLE_BUFFER(data,
967
- N * sizeof(PodType) < max_size_in_bytes
968
- ? N * sizeof(PodType) : max_size_in_bytes);
969
- }
970
-
971
- /// Create a new non-modifiable buffer that represents the given POD array.
972
- /**
973
- * @returns A const_buffer value equivalent to:
974
- * @code const_buffer(
975
- * static_cast<const void*>(data),
976
- * N * sizeof(PodType)); @endcode
977
- */
978
- template <typename PodType, std::size_t N>
979
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
980
- const PodType (&data)[N]) noexcept
981
- {
982
- return BOOST_ASIO_CONST_BUFFER(data, N * sizeof(PodType));
983
- }
984
-
985
- /// Create a new non-modifiable buffer that represents the given POD array.
986
- /**
987
- * @returns A const_buffer value equivalent to:
988
- * @code const_buffer(
989
- * static_cast<const void*>(data),
990
- * min(N * sizeof(PodType), max_size_in_bytes)); @endcode
991
- */
992
- template <typename PodType, std::size_t N>
993
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
994
- const PodType (&data)[N],
995
- std::size_t max_size_in_bytes) noexcept
996
- {
997
- return BOOST_ASIO_CONST_BUFFER(data,
998
- N * sizeof(PodType) < max_size_in_bytes
999
- ? N * sizeof(PodType) : max_size_in_bytes);
1000
- }
1001
-
1002
- /// Create a new modifiable buffer that represents the given POD array.
1003
- /**
1004
- * @returns A mutable_buffer value equivalent to:
1005
- * @code mutable_buffer(
1006
- * data.data(),
1007
- * data.size() * sizeof(PodType)); @endcode
1008
- */
1009
- template <typename PodType, std::size_t N>
1010
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_MUTABLE_BUFFER buffer(
1011
- boost::array<PodType, N>& data) noexcept
1012
- {
1013
- return BOOST_ASIO_MUTABLE_BUFFER(
1014
- data.c_array(), data.size() * sizeof(PodType));
1015
- }
1016
-
1017
- /// Create a new modifiable buffer that represents the given POD array.
1018
- /**
1019
- * @returns A mutable_buffer value equivalent to:
1020
- * @code mutable_buffer(
1021
- * data.data(),
1022
- * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
1023
- */
1024
- template <typename PodType, std::size_t N>
1025
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_MUTABLE_BUFFER buffer(
1026
- boost::array<PodType, N>& data,
1027
- std::size_t max_size_in_bytes) noexcept
1028
- {
1029
- return BOOST_ASIO_MUTABLE_BUFFER(data.c_array(),
1030
- data.size() * sizeof(PodType) < max_size_in_bytes
1031
- ? data.size() * sizeof(PodType) : max_size_in_bytes);
1032
- }
1033
-
1034
- /// Create a new non-modifiable buffer that represents the given POD array.
1035
- /**
1036
- * @returns A const_buffer value equivalent to:
1037
- * @code const_buffer(
1038
- * data.data(),
1039
- * data.size() * sizeof(PodType)); @endcode
1040
- */
1041
- template <typename PodType, std::size_t N>
1042
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
1043
- boost::array<const PodType, N>& data) noexcept
1044
- {
1045
- return BOOST_ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
1046
- }
1047
-
1048
- /// Create a new non-modifiable buffer that represents the given POD array.
1049
- /**
1050
- * @returns A const_buffer value equivalent to:
1051
- * @code const_buffer(
1052
- * data.data(),
1053
- * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
1054
- */
1055
- template <typename PodType, std::size_t N>
1056
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
1057
- boost::array<const PodType, N>& data,
1058
- std::size_t max_size_in_bytes) noexcept
1059
- {
1060
- return BOOST_ASIO_CONST_BUFFER(data.data(),
1061
- data.size() * sizeof(PodType) < max_size_in_bytes
1062
- ? data.size() * sizeof(PodType) : max_size_in_bytes);
1063
- }
1064
-
1065
- /// Create a new non-modifiable buffer that represents the given POD array.
1066
- /**
1067
- * @returns A const_buffer value equivalent to:
1068
- * @code const_buffer(
1069
- * data.data(),
1070
- * data.size() * sizeof(PodType)); @endcode
1071
- */
1072
- template <typename PodType, std::size_t N>
1073
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
1074
- const boost::array<PodType, N>& data) noexcept
1075
- {
1076
- return BOOST_ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
1077
- }
1078
-
1079
- /// Create a new non-modifiable buffer that represents the given POD array.
1080
- /**
1081
- * @returns A const_buffer value equivalent to:
1082
- * @code const_buffer(
1083
- * data.data(),
1084
- * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
1085
- */
1086
- template <typename PodType, std::size_t N>
1087
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
1088
- const boost::array<PodType, N>& data,
1089
- std::size_t max_size_in_bytes) noexcept
1090
- {
1091
- return BOOST_ASIO_CONST_BUFFER(data.data(),
1092
- data.size() * sizeof(PodType) < max_size_in_bytes
1093
- ? data.size() * sizeof(PodType) : max_size_in_bytes);
1094
- }
1095
-
1096
- /// Create a new modifiable buffer that represents the given POD array.
1097
- /**
1098
- * @returns A mutable_buffer value equivalent to:
1099
- * @code mutable_buffer(
1100
- * data.data(),
1101
- * data.size() * sizeof(PodType)); @endcode
1102
- */
1103
- template <typename PodType, std::size_t N>
1104
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_MUTABLE_BUFFER buffer(
1105
- std::array<PodType, N>& data) noexcept
1106
- {
1107
- return BOOST_ASIO_MUTABLE_BUFFER(data.data(), data.size() * sizeof(PodType));
1108
- }
1109
-
1110
- /// Create a new modifiable buffer that represents the given POD array.
1111
- /**
1112
- * @returns A mutable_buffer value equivalent to:
1113
- * @code mutable_buffer(
1114
- * data.data(),
1115
- * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
1116
- */
1117
- template <typename PodType, std::size_t N>
1118
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_MUTABLE_BUFFER buffer(
1119
- std::array<PodType, N>& data,
1120
- std::size_t max_size_in_bytes) noexcept
1121
- {
1122
- return BOOST_ASIO_MUTABLE_BUFFER(data.data(),
1123
- data.size() * sizeof(PodType) < max_size_in_bytes
1124
- ? data.size() * sizeof(PodType) : max_size_in_bytes);
1125
- }
1126
-
1127
- /// Create a new non-modifiable buffer that represents the given POD array.
1128
- /**
1129
- * @returns A const_buffer value equivalent to:
1130
- * @code const_buffer(
1131
- * data.data(),
1132
- * data.size() * sizeof(PodType)); @endcode
1133
- */
1134
- template <typename PodType, std::size_t N>
1135
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
1136
- std::array<const PodType, N>& data) noexcept
1137
- {
1138
- return BOOST_ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
1139
- }
1140
-
1141
- /// Create a new non-modifiable buffer that represents the given POD array.
1142
- /**
1143
- * @returns A const_buffer value equivalent to:
1144
- * @code const_buffer(
1145
- * data.data(),
1146
- * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
1147
- */
1148
- template <typename PodType, std::size_t N>
1149
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
1150
- std::array<const PodType, N>& data,
1151
- std::size_t max_size_in_bytes) noexcept
1152
- {
1153
- return BOOST_ASIO_CONST_BUFFER(data.data(),
1154
- data.size() * sizeof(PodType) < max_size_in_bytes
1155
- ? data.size() * sizeof(PodType) : max_size_in_bytes);
1156
- }
1157
-
1158
- /// Create a new non-modifiable buffer that represents the given POD array.
1159
- /**
1160
- * @returns A const_buffer value equivalent to:
1161
- * @code const_buffer(
1162
- * data.data(),
1163
- * data.size() * sizeof(PodType)); @endcode
1164
- */
1165
- template <typename PodType, std::size_t N>
1166
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
1167
- const std::array<PodType, N>& data) noexcept
1168
- {
1169
- return BOOST_ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
1170
- }
1171
-
1172
- /// Create a new non-modifiable buffer that represents the given POD array.
1173
- /**
1174
- * @returns A const_buffer value equivalent to:
1175
- * @code const_buffer(
1176
- * data.data(),
1177
- * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
1178
- */
1179
- template <typename PodType, std::size_t N>
1180
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
1181
- const std::array<PodType, N>& data,
1182
- std::size_t max_size_in_bytes) noexcept
1183
- {
1184
- return BOOST_ASIO_CONST_BUFFER(data.data(),
1185
- data.size() * sizeof(PodType) < max_size_in_bytes
1186
- ? data.size() * sizeof(PodType) : max_size_in_bytes);
1187
- }
1188
-
1189
- /// Create a new modifiable buffer that represents the given POD vector.
1190
- /**
1191
- * @returns A mutable_buffer value equivalent to:
1192
- * @code mutable_buffer(
1193
- * data.size() ? &data[0] : 0,
1194
- * data.size() * sizeof(PodType)); @endcode
1195
- *
1196
- * @note The buffer is invalidated by any vector operation that would also
1197
- * invalidate iterators.
1198
- */
1199
- template <typename PodType, typename Allocator>
1200
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_MUTABLE_BUFFER buffer(
1201
- std::vector<PodType, Allocator>& data) noexcept
1202
- {
1203
- return BOOST_ASIO_MUTABLE_BUFFER(
1204
- data.size() ? &data[0] : 0, data.size() * sizeof(PodType)
1205
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
1206
- , detail::buffer_debug_check<
1207
- typename std::vector<PodType, Allocator>::iterator
1208
- >(data.begin())
1209
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
1210
- );
1211
- }
1212
-
1213
- /// Create a new modifiable buffer that represents the given POD vector.
1214
- /**
1215
- * @returns A mutable_buffer value equivalent to:
1216
- * @code mutable_buffer(
1217
- * data.size() ? &data[0] : 0,
1218
- * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
1219
- *
1220
- * @note The buffer is invalidated by any vector operation that would also
1221
- * invalidate iterators.
1222
- */
1223
- template <typename PodType, typename Allocator>
1224
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_MUTABLE_BUFFER buffer(
1225
- std::vector<PodType, Allocator>& data,
1226
- std::size_t max_size_in_bytes) noexcept
1227
- {
1228
- return BOOST_ASIO_MUTABLE_BUFFER(data.size() ? &data[0] : 0,
1229
- data.size() * sizeof(PodType) < max_size_in_bytes
1230
- ? data.size() * sizeof(PodType) : max_size_in_bytes
1231
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
1232
- , detail::buffer_debug_check<
1233
- typename std::vector<PodType, Allocator>::iterator
1234
- >(data.begin())
1235
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
1236
- );
1237
- }
1238
-
1239
- /// Create a new non-modifiable buffer that represents the given POD vector.
1240
- /**
1241
- * @returns A const_buffer value equivalent to:
1242
- * @code const_buffer(
1243
- * data.size() ? &data[0] : 0,
1244
- * data.size() * sizeof(PodType)); @endcode
1245
- *
1246
- * @note The buffer is invalidated by any vector operation that would also
1247
- * invalidate iterators.
1248
- */
1249
- template <typename PodType, typename Allocator>
1250
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
1251
- const std::vector<PodType, Allocator>& data) noexcept
1252
- {
1253
- return BOOST_ASIO_CONST_BUFFER(
1254
- data.size() ? &data[0] : 0, data.size() * sizeof(PodType)
1255
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
1256
- , detail::buffer_debug_check<
1257
- typename std::vector<PodType, Allocator>::const_iterator
1258
- >(data.begin())
1259
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
1260
- );
1261
- }
1262
-
1263
- /// Create a new non-modifiable buffer that represents the given POD vector.
1264
- /**
1265
- * @returns A const_buffer value equivalent to:
1266
- * @code const_buffer(
1267
- * data.size() ? &data[0] : 0,
1268
- * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
1269
- *
1270
- * @note The buffer is invalidated by any vector operation that would also
1271
- * invalidate iterators.
1272
- */
1273
- template <typename PodType, typename Allocator>
1274
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
1275
- const std::vector<PodType, Allocator>& data,
1276
- std::size_t max_size_in_bytes) noexcept
1277
- {
1278
- return BOOST_ASIO_CONST_BUFFER(data.size() ? &data[0] : 0,
1279
- data.size() * sizeof(PodType) < max_size_in_bytes
1280
- ? data.size() * sizeof(PodType) : max_size_in_bytes
1281
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
1282
- , detail::buffer_debug_check<
1283
- typename std::vector<PodType, Allocator>::const_iterator
1284
- >(data.begin())
1285
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
1286
- );
1287
- }
1288
-
1289
- /// Create a new modifiable buffer that represents the given string.
1290
- /**
1291
- * @returns <tt>mutable_buffer(data.size() ? &data[0] : 0,
1292
- * data.size() * sizeof(Elem))</tt>.
1293
- *
1294
- * @note The buffer is invalidated by any non-const operation called on the
1295
- * given string object.
1296
- */
1297
- template <typename Elem, typename Traits, typename Allocator>
1298
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_MUTABLE_BUFFER buffer(
1299
- std::basic_string<Elem, Traits, Allocator>& data) noexcept
1300
- {
1301
- return BOOST_ASIO_MUTABLE_BUFFER(data.size() ? &data[0] : 0,
1302
- data.size() * sizeof(Elem)
1303
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
1304
- , detail::buffer_debug_check<
1305
- typename std::basic_string<Elem, Traits, Allocator>::iterator
1306
- >(data.begin())
1307
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
1308
- );
1309
- }
1310
-
1311
- /// Create a new modifiable buffer that represents the given string.
1312
- /**
1313
- * @returns A mutable_buffer value equivalent to:
1314
- * @code mutable_buffer(
1315
- * data.size() ? &data[0] : 0,
1316
- * min(data.size() * sizeof(Elem), max_size_in_bytes)); @endcode
1317
- *
1318
- * @note The buffer is invalidated by any non-const operation called on the
1319
- * given string object.
1320
- */
1321
- template <typename Elem, typename Traits, typename Allocator>
1322
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_MUTABLE_BUFFER buffer(
1323
- std::basic_string<Elem, Traits, Allocator>& data,
1324
- std::size_t max_size_in_bytes) noexcept
1325
- {
1326
- return BOOST_ASIO_MUTABLE_BUFFER(data.size() ? &data[0] : 0,
1327
- data.size() * sizeof(Elem) < max_size_in_bytes
1328
- ? data.size() * sizeof(Elem) : max_size_in_bytes
1329
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
1330
- , detail::buffer_debug_check<
1331
- typename std::basic_string<Elem, Traits, Allocator>::iterator
1332
- >(data.begin())
1333
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
1334
- );
1335
- }
1336
-
1337
- /// Create a new non-modifiable buffer that represents the given string.
1338
- /**
1339
- * @returns <tt>const_buffer(data.data(), data.size() * sizeof(Elem))</tt>.
1340
- *
1341
- * @note The buffer is invalidated by any non-const operation called on the
1342
- * given string object.
1343
- */
1344
- template <typename Elem, typename Traits, typename Allocator>
1345
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
1346
- const std::basic_string<Elem, Traits, Allocator>& data) noexcept
1347
- {
1348
- return BOOST_ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(Elem)
1349
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
1350
- , detail::buffer_debug_check<
1351
- typename std::basic_string<Elem, Traits, Allocator>::const_iterator
1352
- >(data.begin())
1353
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
1354
- );
1355
- }
1356
-
1357
- /// Create a new non-modifiable buffer that represents the given string.
1358
- /**
1359
- * @returns A const_buffer value equivalent to:
1360
- * @code const_buffer(
1361
- * data.data(),
1362
- * min(data.size() * sizeof(Elem), max_size_in_bytes)); @endcode
1363
- *
1364
- * @note The buffer is invalidated by any non-const operation called on the
1365
- * given string object.
1366
- */
1367
- template <typename Elem, typename Traits, typename Allocator>
1368
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
1369
- const std::basic_string<Elem, Traits, Allocator>& data,
1370
- std::size_t max_size_in_bytes) noexcept
1371
- {
1372
- return BOOST_ASIO_CONST_BUFFER(data.data(),
1373
- data.size() * sizeof(Elem) < max_size_in_bytes
1374
- ? data.size() * sizeof(Elem) : max_size_in_bytes
1375
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
1376
- , detail::buffer_debug_check<
1377
- typename std::basic_string<Elem, Traits, Allocator>::const_iterator
1378
- >(data.begin())
1379
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
1380
- );
1381
- }
1382
-
1383
- #if defined(BOOST_ASIO_HAS_STRING_VIEW) \
1384
- || defined(GENERATING_DOCUMENTATION)
1385
-
1386
- /// Create a new non-modifiable buffer that represents the given string_view.
1387
- /**
1388
- * @returns <tt>mutable_buffer(data.size() ? &data[0] : 0,
1389
- * data.size() * sizeof(Elem))</tt>.
1390
- */
1391
- template <typename Elem, typename Traits>
1392
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
1393
- basic_string_view<Elem, Traits> data) noexcept
1394
- {
1395
- return BOOST_ASIO_CONST_BUFFER(data.size() ? &data[0] : 0,
1396
- data.size() * sizeof(Elem)
1397
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
1398
- , detail::buffer_debug_check<
1399
- typename basic_string_view<Elem, Traits>::iterator
1400
- >(data.begin())
1401
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
1402
- );
1403
- }
1404
-
1405
- /// Create a new non-modifiable buffer that represents the given string.
1406
- /**
1407
- * @returns A mutable_buffer value equivalent to:
1408
- * @code mutable_buffer(
1409
- * data.size() ? &data[0] : 0,
1410
- * min(data.size() * sizeof(Elem), max_size_in_bytes)); @endcode
1411
- */
1412
- template <typename Elem, typename Traits>
1413
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
1414
- basic_string_view<Elem, Traits> data,
1415
- std::size_t max_size_in_bytes) noexcept
1416
- {
1417
- return BOOST_ASIO_CONST_BUFFER(data.size() ? &data[0] : 0,
1418
- data.size() * sizeof(Elem) < max_size_in_bytes
1419
- ? data.size() * sizeof(Elem) : max_size_in_bytes
1420
- #if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
1421
- , detail::buffer_debug_check<
1422
- typename basic_string_view<Elem, Traits>::iterator
1423
- >(data.begin())
1424
- #endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
1425
- );
1426
- }
1427
-
1428
- #endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
1429
- // || defined(GENERATING_DOCUMENTATION)
1430
-
1431
- /// Create a new modifiable buffer from a contiguous container.
1432
- /**
1433
- * @returns A mutable_buffer value equivalent to:
1434
- * @code mutable_buffer(
1435
- * data.size() ? &data[0] : 0,
1436
- * data.size() * sizeof(typename T::value_type)); @endcode
1437
- */
1438
- template <typename T>
1439
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_MUTABLE_BUFFER buffer(
1440
- T& data,
1441
- constraint_t<
1442
- is_contiguous_iterator<typename T::iterator>::value,
1443
- defaulted_constraint
1444
- > = defaulted_constraint(),
1445
- constraint_t<
1446
- !is_convertible<T, const_buffer>::value,
1447
- defaulted_constraint
1448
- > = defaulted_constraint(),
1449
- constraint_t<
1450
- !is_convertible<T, mutable_buffer>::value,
1451
- defaulted_constraint
1452
- > = defaulted_constraint(),
1453
- constraint_t<
1454
- !is_const<
1455
- remove_reference_t<
1456
- typename std::iterator_traits<typename T::iterator>::reference
1457
- >
1458
- >::value,
1459
- defaulted_constraint
1460
- > = defaulted_constraint()) noexcept
1461
- {
1462
- return BOOST_ASIO_MUTABLE_BUFFER(
1463
- data.size() ? detail::to_address(data.begin()) : 0,
1464
- data.size() * sizeof(typename T::value_type));
1465
- }
1466
-
1467
- /// Create a new modifiable buffer from a contiguous container.
1468
- /**
1469
- * @returns A mutable_buffer value equivalent to:
1470
- * @code mutable_buffer(
1471
- * data.size() ? &data[0] : 0,
1472
- * min(
1473
- * data.size() * sizeof(typename T::value_type),
1474
- * max_size_in_bytes)); @endcode
1475
- */
1476
- template <typename T>
1477
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_MUTABLE_BUFFER buffer(
1478
- T& data, std::size_t max_size_in_bytes,
1479
- constraint_t<
1480
- is_contiguous_iterator<typename T::iterator>::value,
1481
- defaulted_constraint
1482
- > = defaulted_constraint(),
1483
- constraint_t<
1484
- !is_convertible<T, const_buffer>::value,
1485
- defaulted_constraint
1486
- > = defaulted_constraint(),
1487
- constraint_t<
1488
- !is_convertible<T, mutable_buffer>::value,
1489
- defaulted_constraint
1490
- > = defaulted_constraint(),
1491
- constraint_t<
1492
- !is_const<
1493
- remove_reference_t<
1494
- typename std::iterator_traits<typename T::iterator>::reference
1495
- >
1496
- >::value,
1497
- defaulted_constraint
1498
- > = defaulted_constraint()) noexcept
1499
- {
1500
- return BOOST_ASIO_MUTABLE_BUFFER(
1501
- data.size() ? detail::to_address(data.begin()) : 0,
1502
- data.size() * sizeof(typename T::value_type) < max_size_in_bytes
1503
- ? data.size() * sizeof(typename T::value_type) : max_size_in_bytes);
1504
- }
1505
-
1506
- /// Create a new non-modifiable buffer from a contiguous container.
1507
- /**
1508
- * @returns A const_buffer value equivalent to:
1509
- * @code const_buffer(
1510
- * data.size() ? &data[0] : 0,
1511
- * data.size() * sizeof(typename T::value_type)); @endcode
1512
- */
1513
- template <typename T>
1514
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
1515
- T& data,
1516
- constraint_t<
1517
- is_contiguous_iterator<typename T::iterator>::value,
1518
- defaulted_constraint
1519
- > = defaulted_constraint(),
1520
- constraint_t<
1521
- !is_convertible<T, const_buffer>::value,
1522
- defaulted_constraint
1523
- > = defaulted_constraint(),
1524
- constraint_t<
1525
- !is_convertible<T, mutable_buffer>::value,
1526
- defaulted_constraint
1527
- > = defaulted_constraint(),
1528
- constraint_t<
1529
- is_const<
1530
- remove_reference_t<
1531
- typename std::iterator_traits<typename T::iterator>::reference
1532
- >
1533
- >::value,
1534
- defaulted_constraint
1535
- > = defaulted_constraint()) noexcept
1536
- {
1537
- return BOOST_ASIO_CONST_BUFFER(
1538
- data.size() ? detail::to_address(data.begin()) : 0,
1539
- data.size() * sizeof(typename T::value_type));
1540
- }
1541
-
1542
- /// Create a new non-modifiable buffer from a contiguous container.
1543
- /**
1544
- * @returns A const_buffer value equivalent to:
1545
- * @code const_buffer(
1546
- * data.size() ? &data[0] : 0,
1547
- * min(
1548
- * data.size() * sizeof(typename T::value_type),
1549
- * max_size_in_bytes)); @endcode
1550
- */
1551
- template <typename T>
1552
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
1553
- T& data, std::size_t max_size_in_bytes,
1554
- constraint_t<
1555
- is_contiguous_iterator<typename T::iterator>::value,
1556
- defaulted_constraint
1557
- > = defaulted_constraint(),
1558
- constraint_t<
1559
- !is_convertible<T, const_buffer>::value,
1560
- defaulted_constraint
1561
- > = defaulted_constraint(),
1562
- constraint_t<
1563
- !is_convertible<T, mutable_buffer>::value,
1564
- defaulted_constraint
1565
- > = defaulted_constraint(),
1566
- constraint_t<
1567
- is_const<
1568
- remove_reference_t<
1569
- typename std::iterator_traits<typename T::iterator>::reference
1570
- >
1571
- >::value,
1572
- defaulted_constraint
1573
- > = defaulted_constraint()) noexcept
1574
- {
1575
- return BOOST_ASIO_CONST_BUFFER(
1576
- data.size() ? detail::to_address(data.begin()) : 0,
1577
- data.size() * sizeof(typename T::value_type) < max_size_in_bytes
1578
- ? data.size() * sizeof(typename T::value_type) : max_size_in_bytes);
1579
- }
1580
-
1581
- /// Create a new non-modifiable buffer from a contiguous container.
1582
- /**
1583
- * @returns A const_buffer value equivalent to:
1584
- * @code const_buffer(
1585
- * data.size() ? &data[0] : 0,
1586
- * data.size() * sizeof(typename T::value_type)); @endcode
1587
- */
1588
- template <typename T>
1589
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
1590
- const T& data,
1591
- constraint_t<
1592
- is_contiguous_iterator<typename T::const_iterator>::value,
1593
- defaulted_constraint
1594
- > = defaulted_constraint(),
1595
- constraint_t<
1596
- !is_convertible<T, const_buffer>::value,
1597
- defaulted_constraint
1598
- > = defaulted_constraint(),
1599
- constraint_t<
1600
- !is_convertible<T, mutable_buffer>::value,
1601
- defaulted_constraint
1602
- > = defaulted_constraint()) noexcept
1603
- {
1604
- return BOOST_ASIO_CONST_BUFFER(
1605
- data.size() ? detail::to_address(data.begin()) : 0,
1606
- data.size() * sizeof(typename T::value_type));
1607
- }
1608
-
1609
- /// Create a new non-modifiable buffer from a contiguous container.
1610
- /**
1611
- * @returns A const_buffer value equivalent to:
1612
- * @code const_buffer(
1613
- * data.size() ? &data[0] : 0,
1614
- * min(
1615
- * data.size() * sizeof(typename T::value_type),
1616
- * max_size_in_bytes)); @endcode
1617
- */
1618
- template <typename T>
1619
- BOOST_ASIO_NODISCARD inline BOOST_ASIO_CONST_BUFFER buffer(
1620
- const T& data, std::size_t max_size_in_bytes,
1621
- constraint_t<
1622
- is_contiguous_iterator<typename T::const_iterator>::value,
1623
- defaulted_constraint
1624
- > = defaulted_constraint(),
1625
- constraint_t<
1626
- !is_convertible<T, const_buffer>::value,
1627
- defaulted_constraint
1628
- > = defaulted_constraint(),
1629
- constraint_t<
1630
- !is_convertible<T, mutable_buffer>::value,
1631
- defaulted_constraint
1632
- > = defaulted_constraint()) noexcept
1633
- {
1634
- return BOOST_ASIO_CONST_BUFFER(
1635
- data.size() ? detail::to_address(data.begin()) : 0,
1636
- data.size() * sizeof(typename T::value_type) < max_size_in_bytes
1637
- ? data.size() * sizeof(typename T::value_type) : max_size_in_bytes);
1638
- }
1639
-
1640
- /*@}*/
1641
-
1642
- /// Adapt a basic_string to the DynamicBuffer requirements.
1643
- /**
1644
- * Requires that <tt>sizeof(Elem) == 1</tt>.
1645
- */
1646
- template <typename Elem, typename Traits, typename Allocator>
1647
- class dynamic_string_buffer
1648
- {
1649
- public:
1650
- /// The type used to represent a sequence of constant buffers that refers to
1651
- /// the underlying memory.
1652
- typedef BOOST_ASIO_CONST_BUFFER const_buffers_type;
1653
-
1654
- /// The type used to represent a sequence of mutable buffers that refers to
1655
- /// the underlying memory.
1656
- typedef BOOST_ASIO_MUTABLE_BUFFER mutable_buffers_type;
1657
-
1658
- /// Construct a dynamic buffer from a string.
1659
- /**
1660
- * @param s The string to be used as backing storage for the dynamic buffer.
1661
- * The object stores a reference to the string and the user is responsible
1662
- * for ensuring that the string object remains valid while the
1663
- * dynamic_string_buffer object, and copies of the object, are in use.
1664
- *
1665
- * @b DynamicBuffer_v1: Any existing data in the string is treated as the
1666
- * dynamic buffer's input sequence.
1667
- *
1668
- * @param maximum_size Specifies a maximum size for the buffer, in bytes.
1669
- */
1670
- explicit dynamic_string_buffer(std::basic_string<Elem, Traits, Allocator>& s,
1671
- std::size_t maximum_size =
1672
- (std::numeric_limits<std::size_t>::max)()) noexcept
1673
- : string_(s),
1674
- #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1675
- size_((std::numeric_limits<std::size_t>::max)()),
1676
- #endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1677
- max_size_(maximum_size)
1678
- {
1679
- }
1680
-
1681
- /// @b DynamicBuffer_v2: Copy construct a dynamic buffer.
1682
- dynamic_string_buffer(const dynamic_string_buffer& other) noexcept
1683
- : string_(other.string_),
1684
- #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1685
- size_(other.size_),
1686
- #endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1687
- max_size_(other.max_size_)
1688
- {
1689
- }
1690
-
1691
- /// Move construct a dynamic buffer.
1692
- dynamic_string_buffer(dynamic_string_buffer&& other) noexcept
1693
- : string_(other.string_),
1694
- #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1695
- size_(other.size_),
1696
- #endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1697
- max_size_(other.max_size_)
1698
- {
1699
- }
1700
-
1701
- /// @b DynamicBuffer_v1: Get the size of the input sequence.
1702
- /// @b DynamicBuffer_v2: Get the current size of the underlying memory.
1703
- /**
1704
- * @returns @b DynamicBuffer_v1 The current size of the input sequence.
1705
- * @b DynamicBuffer_v2: The current size of the underlying string if less than
1706
- * max_size(). Otherwise returns max_size().
1707
- */
1708
- std::size_t size() const noexcept
1709
- {
1710
- #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1711
- if (size_ != (std::numeric_limits<std::size_t>::max)())
1712
- return size_;
1713
- #endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1714
- return (std::min)(string_.size(), max_size());
1715
- }
1716
-
1717
- /// Get the maximum size of the dynamic buffer.
1718
- /**
1719
- * @returns The allowed maximum size of the underlying memory.
1720
- */
1721
- std::size_t max_size() const noexcept
1722
- {
1723
- return max_size_;
1724
- }
1725
-
1726
- /// Get the maximum size that the buffer may grow to without triggering
1727
- /// reallocation.
1728
- /**
1729
- * @returns The current capacity of the underlying string if less than
1730
- * max_size(). Otherwise returns max_size().
1731
- */
1732
- std::size_t capacity() const noexcept
1733
- {
1734
- return (std::min)(string_.capacity(), max_size());
1735
- }
1736
-
1737
- #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1738
- /// @b DynamicBuffer_v1: Get a list of buffers that represents the input
1739
- /// sequence.
1740
- /**
1741
- * @returns An object of type @c const_buffers_type that satisfies
1742
- * ConstBufferSequence requirements, representing the basic_string memory in
1743
- * the input sequence.
1744
- *
1745
- * @note The returned object is invalidated by any @c dynamic_string_buffer
1746
- * or @c basic_string member function that resizes or erases the string.
1747
- */
1748
- const_buffers_type data() const noexcept
1749
- {
1750
- return const_buffers_type(boost::asio::buffer(string_, size_));
1751
- }
1752
- #endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1753
-
1754
- /// @b DynamicBuffer_v2: Get a sequence of buffers that represents the
1755
- /// underlying memory.
1756
- /**
1757
- * @param pos Position of the first byte to represent in the buffer sequence
1758
- *
1759
- * @param n The number of bytes to return in the buffer sequence. If the
1760
- * underlying memory is shorter, the buffer sequence represents as many bytes
1761
- * as are available.
1762
- *
1763
- * @returns An object of type @c mutable_buffers_type that satisfies
1764
- * MutableBufferSequence requirements, representing the basic_string memory.
1765
- *
1766
- * @note The returned object is invalidated by any @c dynamic_string_buffer
1767
- * or @c basic_string member function that resizes or erases the string.
1768
- */
1769
- mutable_buffers_type data(std::size_t pos, std::size_t n) noexcept
1770
- {
1771
- return mutable_buffers_type(boost::asio::buffer(
1772
- boost::asio::buffer(string_, max_size_) + pos, n));
1773
- }
1774
-
1775
- /// @b DynamicBuffer_v2: Get a sequence of buffers that represents the
1776
- /// underlying memory.
1777
- /**
1778
- * @param pos Position of the first byte to represent in the buffer sequence
1779
- *
1780
- * @param n The number of bytes to return in the buffer sequence. If the
1781
- * underlying memory is shorter, the buffer sequence represents as many bytes
1782
- * as are available.
1783
- *
1784
- * @note The returned object is invalidated by any @c dynamic_string_buffer
1785
- * or @c basic_string member function that resizes or erases the string.
1786
- */
1787
- const_buffers_type data(std::size_t pos,
1788
- std::size_t n) const noexcept
1789
- {
1790
- return const_buffers_type(boost::asio::buffer(
1791
- boost::asio::buffer(string_, max_size_) + pos, n));
1792
- }
1793
-
1794
- #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1795
- /// @b DynamicBuffer_v1: Get a list of buffers that represents the output
1796
- /// sequence, with the given size.
1797
- /**
1798
- * Ensures that the output sequence can accommodate @c n bytes, resizing the
1799
- * basic_string object as necessary.
1800
- *
1801
- * @returns An object of type @c mutable_buffers_type that satisfies
1802
- * MutableBufferSequence requirements, representing basic_string memory
1803
- * at the start of the output sequence of size @c n.
1804
- *
1805
- * @throws std::length_error If <tt>size() + n > max_size()</tt>.
1806
- *
1807
- * @note The returned object is invalidated by any @c dynamic_string_buffer
1808
- * or @c basic_string member function that modifies the input sequence or
1809
- * output sequence.
1810
- */
1811
- mutable_buffers_type prepare(std::size_t n)
1812
- {
1813
- if (size() > max_size() || max_size() - size() < n)
1814
- {
1815
- std::length_error ex("dynamic_string_buffer too long");
1816
- boost::asio::detail::throw_exception(ex);
1817
- }
1818
-
1819
- if (size_ == (std::numeric_limits<std::size_t>::max)())
1820
- size_ = string_.size(); // Enable v1 behaviour.
1821
-
1822
- string_.resize(size_ + n);
1823
-
1824
- return boost::asio::buffer(boost::asio::buffer(string_) + size_, n);
1825
- }
1826
-
1827
- /// @b DynamicBuffer_v1: Move bytes from the output sequence to the input
1828
- /// sequence.
1829
- /**
1830
- * @param n The number of bytes to append from the start of the output
1831
- * sequence to the end of the input sequence. The remainder of the output
1832
- * sequence is discarded.
1833
- *
1834
- * Requires a preceding call <tt>prepare(x)</tt> where <tt>x >= n</tt>, and
1835
- * no intervening operations that modify the input or output sequence.
1836
- *
1837
- * @note If @c n is greater than the size of the output sequence, the entire
1838
- * output sequence is moved to the input sequence and no error is issued.
1839
- */
1840
- void commit(std::size_t n)
1841
- {
1842
- size_ += (std::min)(n, string_.size() - size_);
1843
- string_.resize(size_);
1844
- }
1845
- #endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1846
-
1847
- /// @b DynamicBuffer_v2: Grow the underlying memory by the specified number of
1848
- /// bytes.
1849
- /**
1850
- * Resizes the string to accommodate an additional @c n bytes at the end.
1851
- *
1852
- * @throws std::length_error If <tt>size() + n > max_size()</tt>.
1853
- */
1854
- void grow(std::size_t n)
1855
- {
1856
- if (size() > max_size() || max_size() - size() < n)
1857
- {
1858
- std::length_error ex("dynamic_string_buffer too long");
1859
- boost::asio::detail::throw_exception(ex);
1860
- }
1861
-
1862
- string_.resize(size() + n);
1863
- }
1864
-
1865
- /// @b DynamicBuffer_v2: Shrink the underlying memory by the specified number
1866
- /// of bytes.
1867
- /**
1868
- * Erases @c n bytes from the end of the string by resizing the basic_string
1869
- * object. If @c n is greater than the current size of the string, the string
1870
- * is emptied.
1871
- */
1872
- void shrink(std::size_t n)
1873
- {
1874
- string_.resize(n > size() ? 0 : size() - n);
1875
- }
1876
-
1877
- /// @b DynamicBuffer_v1: Remove characters from the input sequence.
1878
- /// @b DynamicBuffer_v2: Consume the specified number of bytes from the
1879
- /// beginning of the underlying memory.
1880
- /**
1881
- * @b DynamicBuffer_v1: Removes @c n characters from the beginning of the
1882
- * input sequence. @note If @c n is greater than the size of the input
1883
- * sequence, the entire input sequence is consumed and no error is issued.
1884
- *
1885
- * @b DynamicBuffer_v2: Erases @c n bytes from the beginning of the string.
1886
- * If @c n is greater than the current size of the string, the string is
1887
- * emptied.
1888
- */
1889
- void consume(std::size_t n)
1890
- {
1891
- #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1892
- if (size_ != (std::numeric_limits<std::size_t>::max)())
1893
- {
1894
- std::size_t consume_length = (std::min)(n, size_);
1895
- string_.erase(0, consume_length);
1896
- size_ -= consume_length;
1897
- return;
1898
- }
1899
- #endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1900
- string_.erase(0, n);
1901
- }
1902
-
1903
- private:
1904
- std::basic_string<Elem, Traits, Allocator>& string_;
1905
- #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1906
- std::size_t size_;
1907
- #endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1908
- const std::size_t max_size_;
1909
- };
1910
-
1911
- /// Adapt a vector to the DynamicBuffer requirements.
1912
- /**
1913
- * Requires that <tt>sizeof(Elem) == 1</tt>.
1914
- */
1915
- template <typename Elem, typename Allocator>
1916
- class dynamic_vector_buffer
1917
- {
1918
- public:
1919
- /// The type used to represent a sequence of constant buffers that refers to
1920
- /// the underlying memory.
1921
- typedef BOOST_ASIO_CONST_BUFFER const_buffers_type;
1922
-
1923
- /// The type used to represent a sequence of mutable buffers that refers to
1924
- /// the underlying memory.
1925
- typedef BOOST_ASIO_MUTABLE_BUFFER mutable_buffers_type;
1926
-
1927
- /// Construct a dynamic buffer from a vector.
1928
- /**
1929
- * @param v The vector to be used as backing storage for the dynamic buffer.
1930
- * The object stores a reference to the vector and the user is responsible
1931
- * for ensuring that the vector object remains valid while the
1932
- * dynamic_vector_buffer object, and copies of the object, are in use.
1933
- *
1934
- * @param maximum_size Specifies a maximum size for the buffer, in bytes.
1935
- */
1936
- explicit dynamic_vector_buffer(std::vector<Elem, Allocator>& v,
1937
- std::size_t maximum_size =
1938
- (std::numeric_limits<std::size_t>::max)()) noexcept
1939
- : vector_(v),
1940
- #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1941
- size_((std::numeric_limits<std::size_t>::max)()),
1942
- #endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1943
- max_size_(maximum_size)
1944
- {
1945
- }
1946
-
1947
- /// @b DynamicBuffer_v2: Copy construct a dynamic buffer.
1948
- dynamic_vector_buffer(const dynamic_vector_buffer& other) noexcept
1949
- : vector_(other.vector_),
1950
- #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1951
- size_(other.size_),
1952
- #endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1953
- max_size_(other.max_size_)
1954
- {
1955
- }
1956
-
1957
- /// Move construct a dynamic buffer.
1958
- dynamic_vector_buffer(dynamic_vector_buffer&& other) noexcept
1959
- : vector_(other.vector_),
1960
- #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1961
- size_(other.size_),
1962
- #endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1963
- max_size_(other.max_size_)
1964
- {
1965
- }
1966
-
1967
- /// @b DynamicBuffer_v1: Get the size of the input sequence.
1968
- /// @b DynamicBuffer_v2: Get the current size of the underlying memory.
1969
- /**
1970
- * @returns @b DynamicBuffer_v1 The current size of the input sequence.
1971
- * @b DynamicBuffer_v2: The current size of the underlying vector if less than
1972
- * max_size(). Otherwise returns max_size().
1973
- */
1974
- std::size_t size() const noexcept
1975
- {
1976
- #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1977
- if (size_ != (std::numeric_limits<std::size_t>::max)())
1978
- return size_;
1979
- #endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
1980
- return (std::min)(vector_.size(), max_size());
1981
- }
1982
-
1983
- /// Get the maximum size of the dynamic buffer.
1984
- /**
1985
- * @returns @b DynamicBuffer_v1: The allowed maximum of the sum of the sizes
1986
- * of the input sequence and output sequence. @b DynamicBuffer_v2: The allowed
1987
- * maximum size of the underlying memory.
1988
- */
1989
- std::size_t max_size() const noexcept
1990
- {
1991
- return max_size_;
1992
- }
1993
-
1994
- /// Get the maximum size that the buffer may grow to without triggering
1995
- /// reallocation.
1996
- /**
1997
- * @returns @b DynamicBuffer_v1: The current total capacity of the buffer,
1998
- * i.e. for both the input sequence and output sequence. @b DynamicBuffer_v2:
1999
- * The current capacity of the underlying vector if less than max_size().
2000
- * Otherwise returns max_size().
2001
- */
2002
- std::size_t capacity() const noexcept
2003
- {
2004
- return (std::min)(vector_.capacity(), max_size());
2005
- }
2006
-
2007
- #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
2008
- /// @b DynamicBuffer_v1: Get a list of buffers that represents the input
2009
- /// sequence.
2010
- /**
2011
- * @returns An object of type @c const_buffers_type that satisfies
2012
- * ConstBufferSequence requirements, representing the vector memory in the
2013
- * input sequence.
2014
- *
2015
- * @note The returned object is invalidated by any @c dynamic_vector_buffer
2016
- * or @c vector member function that modifies the input sequence or output
2017
- * sequence.
2018
- */
2019
- const_buffers_type data() const noexcept
2020
- {
2021
- return const_buffers_type(boost::asio::buffer(vector_, size_));
2022
- }
2023
- #endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
2024
-
2025
- /// @b DynamicBuffer_v2: Get a sequence of buffers that represents the
2026
- /// underlying memory.
2027
- /**
2028
- * @param pos Position of the first byte to represent in the buffer sequence
2029
- *
2030
- * @param n The number of bytes to return in the buffer sequence. If the
2031
- * underlying memory is shorter, the buffer sequence represents as many bytes
2032
- * as are available.
2033
- *
2034
- * @returns An object of type @c mutable_buffers_type that satisfies
2035
- * MutableBufferSequence requirements, representing the vector memory.
2036
- *
2037
- * @note The returned object is invalidated by any @c dynamic_vector_buffer
2038
- * or @c vector member function that resizes or erases the vector.
2039
- */
2040
- mutable_buffers_type data(std::size_t pos, std::size_t n) noexcept
2041
- {
2042
- return mutable_buffers_type(boost::asio::buffer(
2043
- boost::asio::buffer(vector_, max_size_) + pos, n));
2044
- }
2045
-
2046
- /// @b DynamicBuffer_v2: Get a sequence of buffers that represents the
2047
- /// underlying memory.
2048
- /**
2049
- * @param pos Position of the first byte to represent in the buffer sequence
2050
- *
2051
- * @param n The number of bytes to return in the buffer sequence. If the
2052
- * underlying memory is shorter, the buffer sequence represents as many bytes
2053
- * as are available.
2054
- *
2055
- * @note The returned object is invalidated by any @c dynamic_vector_buffer
2056
- * or @c vector member function that resizes or erases the vector.
2057
- */
2058
- const_buffers_type data(std::size_t pos,
2059
- std::size_t n) const noexcept
2060
- {
2061
- return const_buffers_type(boost::asio::buffer(
2062
- boost::asio::buffer(vector_, max_size_) + pos, n));
2063
- }
2064
-
2065
- #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
2066
- /// @b DynamicBuffer_v1: Get a list of buffers that represents the output
2067
- /// sequence, with the given size.
2068
- /**
2069
- * Ensures that the output sequence can accommodate @c n bytes, resizing the
2070
- * vector object as necessary.
2071
- *
2072
- * @returns An object of type @c mutable_buffers_type that satisfies
2073
- * MutableBufferSequence requirements, representing vector memory at the
2074
- * start of the output sequence of size @c n.
2075
- *
2076
- * @throws std::length_error If <tt>size() + n > max_size()</tt>.
2077
- *
2078
- * @note The returned object is invalidated by any @c dynamic_vector_buffer
2079
- * or @c vector member function that modifies the input sequence or output
2080
- * sequence.
2081
- */
2082
- mutable_buffers_type prepare(std::size_t n)
2083
- {
2084
- if (size () > max_size() || max_size() - size() < n)
2085
- {
2086
- std::length_error ex("dynamic_vector_buffer too long");
2087
- boost::asio::detail::throw_exception(ex);
2088
- }
2089
-
2090
- if (size_ == (std::numeric_limits<std::size_t>::max)())
2091
- size_ = vector_.size(); // Enable v1 behaviour.
2092
-
2093
- vector_.resize(size_ + n);
2094
-
2095
- return boost::asio::buffer(boost::asio::buffer(vector_) + size_, n);
2096
- }
2097
-
2098
- /// @b DynamicBuffer_v1: Move bytes from the output sequence to the input
2099
- /// sequence.
2100
- /**
2101
- * @param n The number of bytes to append from the start of the output
2102
- * sequence to the end of the input sequence. The remainder of the output
2103
- * sequence is discarded.
2104
- *
2105
- * Requires a preceding call <tt>prepare(x)</tt> where <tt>x >= n</tt>, and
2106
- * no intervening operations that modify the input or output sequence.
2107
- *
2108
- * @note If @c n is greater than the size of the output sequence, the entire
2109
- * output sequence is moved to the input sequence and no error is issued.
2110
- */
2111
- void commit(std::size_t n)
2112
- {
2113
- size_ += (std::min)(n, vector_.size() - size_);
2114
- vector_.resize(size_);
2115
- }
2116
- #endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
2117
-
2118
- /// @b DynamicBuffer_v2: Grow the underlying memory by the specified number of
2119
- /// bytes.
2120
- /**
2121
- * Resizes the vector to accommodate an additional @c n bytes at the end.
2122
- *
2123
- * @throws std::length_error If <tt>size() + n > max_size()</tt>.
2124
- */
2125
- void grow(std::size_t n)
2126
- {
2127
- if (size() > max_size() || max_size() - size() < n)
2128
- {
2129
- std::length_error ex("dynamic_vector_buffer too long");
2130
- boost::asio::detail::throw_exception(ex);
2131
- }
2132
-
2133
- vector_.resize(size() + n);
2134
- }
2135
-
2136
- /// @b DynamicBuffer_v2: Shrink the underlying memory by the specified number
2137
- /// of bytes.
2138
- /**
2139
- * Erases @c n bytes from the end of the vector by resizing the vector
2140
- * object. If @c n is greater than the current size of the vector, the vector
2141
- * is emptied.
2142
- */
2143
- void shrink(std::size_t n)
2144
- {
2145
- vector_.resize(n > size() ? 0 : size() - n);
2146
- }
2147
-
2148
- /// @b DynamicBuffer_v1: Remove characters from the input sequence.
2149
- /// @b DynamicBuffer_v2: Consume the specified number of bytes from the
2150
- /// beginning of the underlying memory.
2151
- /**
2152
- * @b DynamicBuffer_v1: Removes @c n characters from the beginning of the
2153
- * input sequence. @note If @c n is greater than the size of the input
2154
- * sequence, the entire input sequence is consumed and no error is issued.
2155
- *
2156
- * @b DynamicBuffer_v2: Erases @c n bytes from the beginning of the vector.
2157
- * If @c n is greater than the current size of the vector, the vector is
2158
- * emptied.
2159
- */
2160
- void consume(std::size_t n)
2161
- {
2162
- #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
2163
- if (size_ != (std::numeric_limits<std::size_t>::max)())
2164
- {
2165
- std::size_t consume_length = (std::min)(n, size_);
2166
- vector_.erase(vector_.begin(), vector_.begin() + consume_length);
2167
- size_ -= consume_length;
2168
- return;
2169
- }
2170
- #endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
2171
- vector_.erase(vector_.begin(), vector_.begin() + (std::min)(size(), n));
2172
- }
2173
-
2174
- private:
2175
- std::vector<Elem, Allocator>& vector_;
2176
- #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
2177
- std::size_t size_;
2178
- #endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
2179
- const std::size_t max_size_;
2180
- };
2181
-
2182
- /** @defgroup dynamic_buffer boost::asio::dynamic_buffer
2183
- *
2184
- * @brief The boost::asio::dynamic_buffer function is used to create a
2185
- * dynamically resized buffer from a @c std::basic_string or @c std::vector.
2186
- */
2187
- /*@{*/
2188
-
2189
- /// Create a new dynamic buffer that represents the given string.
2190
- /**
2191
- * @returns <tt>dynamic_string_buffer<Elem, Traits, Allocator>(data)</tt>.
2192
- */
2193
- template <typename Elem, typename Traits, typename Allocator>
2194
- BOOST_ASIO_NODISCARD inline
2195
- dynamic_string_buffer<Elem, Traits, Allocator> dynamic_buffer(
2196
- std::basic_string<Elem, Traits, Allocator>& data) noexcept
2197
- {
2198
- return dynamic_string_buffer<Elem, Traits, Allocator>(data);
2199
- }
2200
-
2201
- /// Create a new dynamic buffer that represents the given string.
2202
- /**
2203
- * @returns <tt>dynamic_string_buffer<Elem, Traits, Allocator>(data,
2204
- * max_size)</tt>.
2205
- */
2206
- template <typename Elem, typename Traits, typename Allocator>
2207
- BOOST_ASIO_NODISCARD inline
2208
- dynamic_string_buffer<Elem, Traits, Allocator> dynamic_buffer(
2209
- std::basic_string<Elem, Traits, Allocator>& data,
2210
- std::size_t max_size) noexcept
2211
- {
2212
- return dynamic_string_buffer<Elem, Traits, Allocator>(data, max_size);
2213
- }
2214
-
2215
- /// Create a new dynamic buffer that represents the given vector.
2216
- /**
2217
- * @returns <tt>dynamic_vector_buffer<Elem, Allocator>(data)</tt>.
2218
- */
2219
- template <typename Elem, typename Allocator>
2220
- BOOST_ASIO_NODISCARD inline
2221
- dynamic_vector_buffer<Elem, Allocator> dynamic_buffer(
2222
- std::vector<Elem, Allocator>& data) noexcept
2223
- {
2224
- return dynamic_vector_buffer<Elem, Allocator>(data);
2225
- }
2226
-
2227
- /// Create a new dynamic buffer that represents the given vector.
2228
- /**
2229
- * @returns <tt>dynamic_vector_buffer<Elem, Allocator>(data, max_size)</tt>.
2230
- */
2231
- template <typename Elem, typename Allocator>
2232
- BOOST_ASIO_NODISCARD inline
2233
- dynamic_vector_buffer<Elem, Allocator> dynamic_buffer(
2234
- std::vector<Elem, Allocator>& data,
2235
- std::size_t max_size) noexcept
2236
- {
2237
- return dynamic_vector_buffer<Elem, Allocator>(data, max_size);
2238
- }
2239
-
2240
- /*@}*/
2241
-
2242
- /** @defgroup buffer_copy boost::asio::buffer_copy
2243
- *
2244
- * @brief The boost::asio::buffer_copy function is used to copy bytes from a
2245
- * source buffer (or buffer sequence) to a target buffer (or buffer sequence).
2246
- *
2247
- * The @c buffer_copy function is available in two forms:
2248
- *
2249
- * @li A 2-argument form: @c buffer_copy(target, source)
2250
- *
2251
- * @li A 3-argument form: @c buffer_copy(target, source, max_bytes_to_copy)
2252
- *
2253
- * Both forms return the number of bytes actually copied. The number of bytes
2254
- * copied is the lesser of:
2255
- *
2256
- * @li @c buffer_size(target)
2257
- *
2258
- * @li @c buffer_size(source)
2259
- *
2260
- * @li @c If specified, @c max_bytes_to_copy.
2261
- *
2262
- * This prevents buffer overflow, regardless of the buffer sizes used in the
2263
- * copy operation.
2264
- *
2265
- * Note that @ref buffer_copy is implemented in terms of @c memcpy, and
2266
- * consequently it cannot be used to copy between overlapping memory regions.
2267
- */
2268
- /*@{*/
2269
-
2270
- namespace detail {
2271
-
2272
- inline std::size_t buffer_copy_1(const mutable_buffer& target,
2273
- const const_buffer& source)
2274
- {
2275
- using namespace std; // For memcpy.
2276
- std::size_t target_size = target.size();
2277
- std::size_t source_size = source.size();
2278
- std::size_t n = target_size < source_size ? target_size : source_size;
2279
- if (n > 0)
2280
- memcpy(target.data(), source.data(), n);
2281
- return n;
2282
- }
2283
-
2284
- template <typename TargetIterator, typename SourceIterator>
2285
- inline std::size_t buffer_copy(one_buffer, one_buffer,
2286
- TargetIterator target_begin, TargetIterator,
2287
- SourceIterator source_begin, SourceIterator) noexcept
2288
- {
2289
- return (buffer_copy_1)(*target_begin, *source_begin);
2290
- }
2291
-
2292
- template <typename TargetIterator, typename SourceIterator>
2293
- inline std::size_t buffer_copy(one_buffer, one_buffer,
2294
- TargetIterator target_begin, TargetIterator,
2295
- SourceIterator source_begin, SourceIterator,
2296
- std::size_t max_bytes_to_copy) noexcept
2297
- {
2298
- return (buffer_copy_1)(*target_begin,
2299
- boost::asio::buffer(*source_begin, max_bytes_to_copy));
2300
- }
2301
-
2302
- template <typename TargetIterator, typename SourceIterator>
2303
- std::size_t buffer_copy(one_buffer, multiple_buffers,
2304
- TargetIterator target_begin, TargetIterator,
2305
- SourceIterator source_begin, SourceIterator source_end,
2306
- std::size_t max_bytes_to_copy
2307
- = (std::numeric_limits<std::size_t>::max)()) noexcept
2308
- {
2309
- std::size_t total_bytes_copied = 0;
2310
- SourceIterator source_iter = source_begin;
2311
-
2312
- for (mutable_buffer target_buffer(
2313
- boost::asio::buffer(*target_begin, max_bytes_to_copy));
2314
- target_buffer.size() && source_iter != source_end; ++source_iter)
2315
- {
2316
- const_buffer source_buffer(*source_iter);
2317
- std::size_t bytes_copied = (buffer_copy_1)(target_buffer, source_buffer);
2318
- total_bytes_copied += bytes_copied;
2319
- target_buffer += bytes_copied;
2320
- }
2321
-
2322
- return total_bytes_copied;
2323
- }
2324
-
2325
- template <typename TargetIterator, typename SourceIterator>
2326
- std::size_t buffer_copy(multiple_buffers, one_buffer,
2327
- TargetIterator target_begin, TargetIterator target_end,
2328
- SourceIterator source_begin, SourceIterator,
2329
- std::size_t max_bytes_to_copy
2330
- = (std::numeric_limits<std::size_t>::max)()) noexcept
2331
- {
2332
- std::size_t total_bytes_copied = 0;
2333
- TargetIterator target_iter = target_begin;
2334
-
2335
- for (const_buffer source_buffer(
2336
- boost::asio::buffer(*source_begin, max_bytes_to_copy));
2337
- source_buffer.size() && target_iter != target_end; ++target_iter)
2338
- {
2339
- mutable_buffer target_buffer(*target_iter);
2340
- std::size_t bytes_copied = (buffer_copy_1)(target_buffer, source_buffer);
2341
- total_bytes_copied += bytes_copied;
2342
- source_buffer += bytes_copied;
2343
- }
2344
-
2345
- return total_bytes_copied;
2346
- }
2347
-
2348
- template <typename TargetIterator, typename SourceIterator>
2349
- std::size_t buffer_copy(multiple_buffers, multiple_buffers,
2350
- TargetIterator target_begin, TargetIterator target_end,
2351
- SourceIterator source_begin, SourceIterator source_end) noexcept
2352
- {
2353
- std::size_t total_bytes_copied = 0;
2354
-
2355
- TargetIterator target_iter = target_begin;
2356
- std::size_t target_buffer_offset = 0;
2357
-
2358
- SourceIterator source_iter = source_begin;
2359
- std::size_t source_buffer_offset = 0;
2360
-
2361
- while (target_iter != target_end && source_iter != source_end)
2362
- {
2363
- mutable_buffer target_buffer =
2364
- mutable_buffer(*target_iter) + target_buffer_offset;
2365
-
2366
- const_buffer source_buffer =
2367
- const_buffer(*source_iter) + source_buffer_offset;
2368
-
2369
- std::size_t bytes_copied = (buffer_copy_1)(target_buffer, source_buffer);
2370
- total_bytes_copied += bytes_copied;
2371
-
2372
- if (bytes_copied == target_buffer.size())
2373
- {
2374
- ++target_iter;
2375
- target_buffer_offset = 0;
2376
- }
2377
- else
2378
- target_buffer_offset += bytes_copied;
2379
-
2380
- if (bytes_copied == source_buffer.size())
2381
- {
2382
- ++source_iter;
2383
- source_buffer_offset = 0;
2384
- }
2385
- else
2386
- source_buffer_offset += bytes_copied;
2387
- }
2388
-
2389
- return total_bytes_copied;
2390
- }
2391
-
2392
- template <typename TargetIterator, typename SourceIterator>
2393
- std::size_t buffer_copy(multiple_buffers, multiple_buffers,
2394
- TargetIterator target_begin, TargetIterator target_end,
2395
- SourceIterator source_begin, SourceIterator source_end,
2396
- std::size_t max_bytes_to_copy) noexcept
2397
- {
2398
- std::size_t total_bytes_copied = 0;
2399
-
2400
- TargetIterator target_iter = target_begin;
2401
- std::size_t target_buffer_offset = 0;
2402
-
2403
- SourceIterator source_iter = source_begin;
2404
- std::size_t source_buffer_offset = 0;
2405
-
2406
- while (total_bytes_copied != max_bytes_to_copy
2407
- && target_iter != target_end && source_iter != source_end)
2408
- {
2409
- mutable_buffer target_buffer =
2410
- mutable_buffer(*target_iter) + target_buffer_offset;
2411
-
2412
- const_buffer source_buffer =
2413
- const_buffer(*source_iter) + source_buffer_offset;
2414
-
2415
- std::size_t bytes_copied = (buffer_copy_1)(
2416
- target_buffer, boost::asio::buffer(source_buffer,
2417
- max_bytes_to_copy - total_bytes_copied));
2418
- total_bytes_copied += bytes_copied;
2419
-
2420
- if (bytes_copied == target_buffer.size())
2421
- {
2422
- ++target_iter;
2423
- target_buffer_offset = 0;
2424
- }
2425
- else
2426
- target_buffer_offset += bytes_copied;
2427
-
2428
- if (bytes_copied == source_buffer.size())
2429
- {
2430
- ++source_iter;
2431
- source_buffer_offset = 0;
2432
- }
2433
- else
2434
- source_buffer_offset += bytes_copied;
2435
- }
2436
-
2437
- return total_bytes_copied;
2438
- }
2439
-
2440
- } // namespace detail
2441
-
2442
- /// Copies bytes from a source buffer sequence to a target buffer sequence.
2443
- /**
2444
- * @param target A modifiable buffer sequence representing the memory regions to
2445
- * which the bytes will be copied.
2446
- *
2447
- * @param source A non-modifiable buffer sequence representing the memory
2448
- * regions from which the bytes will be copied.
2449
- *
2450
- * @returns The number of bytes copied.
2451
- *
2452
- * @note The number of bytes copied is the lesser of:
2453
- *
2454
- * @li @c buffer_size(target)
2455
- *
2456
- * @li @c buffer_size(source)
2457
- *
2458
- * This function is implemented in terms of @c memcpy, and consequently it
2459
- * cannot be used to copy between overlapping memory regions.
2460
- */
2461
- template <typename MutableBufferSequence, typename ConstBufferSequence>
2462
- inline std::size_t buffer_copy(const MutableBufferSequence& target,
2463
- const ConstBufferSequence& source) noexcept
2464
- {
2465
- return detail::buffer_copy(
2466
- detail::buffer_sequence_cardinality<MutableBufferSequence>(),
2467
- detail::buffer_sequence_cardinality<ConstBufferSequence>(),
2468
- boost::asio::buffer_sequence_begin(target),
2469
- boost::asio::buffer_sequence_end(target),
2470
- boost::asio::buffer_sequence_begin(source),
2471
- boost::asio::buffer_sequence_end(source));
2472
- }
2473
-
2474
- /// Copies a limited number of bytes from a source buffer sequence to a target
2475
- /// buffer sequence.
2476
- /**
2477
- * @param target A modifiable buffer sequence representing the memory regions to
2478
- * which the bytes will be copied.
2479
- *
2480
- * @param source A non-modifiable buffer sequence representing the memory
2481
- * regions from which the bytes will be copied.
2482
- *
2483
- * @param max_bytes_to_copy The maximum number of bytes to be copied.
2484
- *
2485
- * @returns The number of bytes copied.
2486
- *
2487
- * @note The number of bytes copied is the lesser of:
2488
- *
2489
- * @li @c buffer_size(target)
2490
- *
2491
- * @li @c buffer_size(source)
2492
- *
2493
- * @li @c max_bytes_to_copy
2494
- *
2495
- * This function is implemented in terms of @c memcpy, and consequently it
2496
- * cannot be used to copy between overlapping memory regions.
2497
- */
2498
- template <typename MutableBufferSequence, typename ConstBufferSequence>
2499
- inline std::size_t buffer_copy(const MutableBufferSequence& target,
2500
- const ConstBufferSequence& source,
2501
- std::size_t max_bytes_to_copy) noexcept
2502
- {
2503
- return detail::buffer_copy(
2504
- detail::buffer_sequence_cardinality<MutableBufferSequence>(),
2505
- detail::buffer_sequence_cardinality<ConstBufferSequence>(),
2506
- boost::asio::buffer_sequence_begin(target),
2507
- boost::asio::buffer_sequence_end(target),
2508
- boost::asio::buffer_sequence_begin(source),
2509
- boost::asio::buffer_sequence_end(source), max_bytes_to_copy);
2510
- }
2511
-
2512
- /*@}*/
2513
-
2514
- } // namespace asio
2515
- } // namespace boost
2516
-
2517
- #include <boost/asio/detail/pop_options.hpp>
2518
- #include <boost/asio/detail/is_buffer_sequence.hpp>
2519
- #include <boost/asio/detail/push_options.hpp>
2520
-
2521
- namespace boost {
2522
- namespace asio {
2523
-
2524
- /// Trait to determine whether a type satisfies the MutableBufferSequence
2525
- /// requirements.
2526
- template <typename T>
2527
- struct is_mutable_buffer_sequence
2528
- #if defined(GENERATING_DOCUMENTATION)
2529
- : integral_constant<bool, automatically_determined>
2530
- #else // defined(GENERATING_DOCUMENTATION)
2531
- : boost::asio::detail::is_buffer_sequence<T, mutable_buffer>
2532
- #endif // defined(GENERATING_DOCUMENTATION)
2533
- {
2534
- };
2535
-
2536
- /// Trait to determine whether a type satisfies the ConstBufferSequence
2537
- /// requirements.
2538
- template <typename T>
2539
- struct is_const_buffer_sequence
2540
- #if defined(GENERATING_DOCUMENTATION)
2541
- : integral_constant<bool, automatically_determined>
2542
- #else // defined(GENERATING_DOCUMENTATION)
2543
- : boost::asio::detail::is_buffer_sequence<T, const_buffer>
2544
- #endif // defined(GENERATING_DOCUMENTATION)
2545
- {
2546
- };
2547
-
2548
- #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
2549
- /// Trait to determine whether a type satisfies the DynamicBuffer_v1
2550
- /// requirements.
2551
- template <typename T>
2552
- struct is_dynamic_buffer_v1
2553
- #if defined(GENERATING_DOCUMENTATION)
2554
- : integral_constant<bool, automatically_determined>
2555
- #else // defined(GENERATING_DOCUMENTATION)
2556
- : boost::asio::detail::is_dynamic_buffer_v1<T>
2557
- #endif // defined(GENERATING_DOCUMENTATION)
2558
- {
2559
- };
2560
- #endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
2561
-
2562
- /// Trait to determine whether a type satisfies the DynamicBuffer_v2
2563
- /// requirements.
2564
- template <typename T>
2565
- struct is_dynamic_buffer_v2
2566
- #if defined(GENERATING_DOCUMENTATION)
2567
- : integral_constant<bool, automatically_determined>
2568
- #else // defined(GENERATING_DOCUMENTATION)
2569
- : boost::asio::detail::is_dynamic_buffer_v2<T>
2570
- #endif // defined(GENERATING_DOCUMENTATION)
2571
- {
2572
- };
2573
-
2574
- /// Trait to determine whether a type satisfies the DynamicBuffer requirements.
2575
- /**
2576
- * If @c BOOST_ASIO_NO_DYNAMIC_BUFFER_V1 is not defined, determines whether the
2577
- * type satisfies the DynamicBuffer_v1 requirements. Otherwise, if @c
2578
- * BOOST_ASIO_NO_DYNAMIC_BUFFER_V1 is defined, determines whether the type
2579
- * satisfies the DynamicBuffer_v2 requirements.
2580
- */
2581
- template <typename T>
2582
- struct is_dynamic_buffer
2583
- #if defined(GENERATING_DOCUMENTATION)
2584
- : integral_constant<bool, automatically_determined>
2585
- #elif defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
2586
- : boost::asio::is_dynamic_buffer_v2<T>
2587
- #else // defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
2588
- : boost::asio::is_dynamic_buffer_v1<T>
2589
- #endif // defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
2590
- {
2591
- };
2592
-
2593
- namespace buffer_literals {
2594
- namespace detail {
2595
-
2596
- template <char... Chars>
2597
- struct chars {};
2598
-
2599
- template <unsigned char... Bytes>
2600
- struct bytes {};
2601
-
2602
- // Literal processor that converts binary literals to an array of bytes.
2603
-
2604
- template <typename Bytes, char... Chars>
2605
- struct bin_literal;
2606
-
2607
- template <unsigned char... Bytes>
2608
- struct bin_literal<bytes<Bytes...>>
2609
- {
2610
- static const std::size_t size = sizeof...(Bytes);
2611
- static const unsigned char data[sizeof...(Bytes)];
2612
- };
2613
-
2614
- template <unsigned char... Bytes>
2615
- const unsigned char bin_literal<bytes<Bytes...>>::data[sizeof...(Bytes)]
2616
- = { Bytes... };
2617
-
2618
- template <unsigned char... Bytes, char Bit7, char Bit6, char Bit5,
2619
- char Bit4, char Bit3, char Bit2, char Bit1, char Bit0, char... Chars>
2620
- struct bin_literal<bytes<Bytes...>, Bit7, Bit6,
2621
- Bit5, Bit4, Bit3, Bit2, Bit1, Bit0, Chars...> :
2622
- bin_literal<
2623
- bytes<Bytes...,
2624
- static_cast<unsigned char>(
2625
- (Bit7 == '1' ? 0x80 : 0) |
2626
- (Bit6 == '1' ? 0x40 : 0) |
2627
- (Bit5 == '1' ? 0x20 : 0) |
2628
- (Bit4 == '1' ? 0x10 : 0) |
2629
- (Bit3 == '1' ? 0x08 : 0) |
2630
- (Bit2 == '1' ? 0x04 : 0) |
2631
- (Bit1 == '1' ? 0x02 : 0) |
2632
- (Bit0 == '1' ? 0x01 : 0))
2633
- >, Chars...> {};
2634
-
2635
- template <unsigned char... Bytes, char... Chars>
2636
- struct bin_literal<bytes<Bytes...>, Chars...>
2637
- {
2638
- static_assert(sizeof...(Chars) == 0,
2639
- "number of digits in a binary buffer literal must be a multiple of 8");
2640
-
2641
- static const std::size_t size = 0;
2642
- static const unsigned char data[1];
2643
- };
2644
-
2645
- template <unsigned char... Bytes, char... Chars>
2646
- const unsigned char bin_literal<bytes<Bytes...>, Chars...>::data[1] = {};
2647
-
2648
- // Literal processor that converts hexadecimal literals to an array of bytes.
2649
-
2650
- template <typename Bytes, char... Chars>
2651
- struct hex_literal;
2652
-
2653
- template <unsigned char... Bytes>
2654
- struct hex_literal<bytes<Bytes...>>
2655
- {
2656
- static const std::size_t size = sizeof...(Bytes);
2657
- static const unsigned char data[sizeof...(Bytes)];
2658
- };
2659
-
2660
- template <unsigned char... Bytes>
2661
- const unsigned char hex_literal<bytes<Bytes...>>::data[sizeof...(Bytes)]
2662
- = { Bytes... };
2663
-
2664
- template <unsigned char... Bytes, char Hi, char Lo, char... Chars>
2665
- struct hex_literal<bytes<Bytes...>, Hi, Lo, Chars...> :
2666
- hex_literal<
2667
- bytes<Bytes...,
2668
- static_cast<unsigned char>(
2669
- Lo >= 'A' && Lo <= 'F' ? Lo - 'A' + 10 :
2670
- (Lo >= 'a' && Lo <= 'f' ? Lo - 'a' + 10 : Lo - '0')) |
2671
- ((static_cast<unsigned char>(
2672
- Hi >= 'A' && Hi <= 'F' ? Hi - 'A' + 10 :
2673
- (Hi >= 'a' && Hi <= 'f' ? Hi - 'a' + 10 : Hi - '0'))) << 4)
2674
- >, Chars...> {};
2675
-
2676
- template <unsigned char... Bytes, char Char>
2677
- struct hex_literal<bytes<Bytes...>, Char>
2678
- {
2679
- static_assert(!Char,
2680
- "a hexadecimal buffer literal must have an even number of digits");
2681
-
2682
- static const std::size_t size = 0;
2683
- static const unsigned char data[1];
2684
- };
2685
-
2686
- template <unsigned char... Bytes, char Char>
2687
- const unsigned char hex_literal<bytes<Bytes...>, Char>::data[1] = {};
2688
-
2689
- // Helper template that removes digit separators and then passes the cleaned
2690
- // variadic pack of characters to the literal processor.
2691
-
2692
- template <template <typename, char...> class Literal,
2693
- typename Clean, char... Raw>
2694
- struct remove_separators;
2695
-
2696
- template <template <typename, char...> class Literal,
2697
- char... Clean, char... Raw>
2698
- struct remove_separators<Literal, chars<Clean...>, '\'', Raw...> :
2699
- remove_separators<Literal, chars<Clean...>, Raw...> {};
2700
-
2701
- template <template <typename, char...> class Literal,
2702
- char... Clean, char C, char... Raw>
2703
- struct remove_separators<Literal, chars<Clean...>, C, Raw...> :
2704
- remove_separators<Literal, chars<Clean..., C>, Raw...> {};
2705
-
2706
- template <template <typename, char...> class Literal, char... Clean>
2707
- struct remove_separators<Literal, chars<Clean...>> :
2708
- Literal<bytes<>, Clean...> {};
2709
-
2710
- // Helper template to determine the literal type based on the prefix.
2711
-
2712
- template <char... Chars>
2713
- struct literal;
2714
-
2715
- template <char... Chars>
2716
- struct literal<'0', 'b', Chars...> :
2717
- remove_separators<bin_literal, chars<>, Chars...>{};
2718
-
2719
- template <char... Chars>
2720
- struct literal<'0', 'B', Chars...> :
2721
- remove_separators<bin_literal, chars<>, Chars...>{};
2722
-
2723
- template <char... Chars>
2724
- struct literal<'0', 'x', Chars...> :
2725
- remove_separators<hex_literal, chars<>, Chars...>{};
2726
-
2727
- template <char... Chars>
2728
- struct literal<'0', 'X', Chars...> :
2729
- remove_separators<hex_literal, chars<>, Chars...>{};
2730
-
2731
- } // namespace detail
2732
-
2733
- /// Literal operator for creating const_buffer objects from string literals.
2734
- inline BOOST_ASIO_CONST_BUFFER operator ""_buf(const char* data, std::size_t n)
2735
- {
2736
- return BOOST_ASIO_CONST_BUFFER(data, n);
2737
- }
2738
-
2739
- /// Literal operator for creating const_buffer objects from unbounded binary or
2740
- /// hexadecimal integer literals.
2741
- template <char... Chars>
2742
- inline BOOST_ASIO_CONST_BUFFER operator ""_buf()
2743
- {
2744
- return BOOST_ASIO_CONST_BUFFER(
2745
- +detail::literal<Chars...>::data,
2746
- detail::literal<Chars...>::size);
2747
- }
2748
-
2749
- } // namespace buffer_literals
2750
- } // namespace asio
2751
- } // namespace boost
2752
-
2753
- #include <boost/asio/detail/pop_options.hpp>
2754
-
2755
- #endif // BOOST_ASIO_BUFFER_HPP