passenger 6.0.26 → 6.0.27

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