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,2375 +0,0 @@
1
- /*
2
- * Copyright (c) 2014, Peter Thorson. All rights reserved.
3
- *
4
- * Redistribution and use in source and binary forms, with or without
5
- * modification, are permitted provided that the following conditions are met:
6
- * * Redistributions of source code must retain the above copyright
7
- * notice, this list of conditions and the following disclaimer.
8
- * * Redistributions in binary form must reproduce the above copyright
9
- * notice, this list of conditions and the following disclaimer in the
10
- * documentation and/or other materials provided with the distribution.
11
- * * Neither the name of the WebSocket++ Project nor the
12
- * names of its contributors may be used to endorse or promote products
13
- * derived from this software without specific prior written permission.
14
- *
15
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18
- * ARE DISCLAIMED. IN NO EVENT SHALL PETER THORSON BE LIABLE FOR ANY
19
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
- *
26
- */
27
-
28
- #ifndef WEBSOCKETPP_CONNECTION_IMPL_HPP
29
- #define WEBSOCKETPP_CONNECTION_IMPL_HPP
30
-
31
- #include <websocketpp/processors/hybi00.hpp>
32
- #include <websocketpp/processors/hybi07.hpp>
33
- #include <websocketpp/processors/hybi08.hpp>
34
- #include <websocketpp/processors/hybi13.hpp>
35
-
36
- #include <websocketpp/processors/processor.hpp>
37
-
38
- #include <websocketpp/common/platforms.hpp>
39
- #include <websocketpp/common/system_error.hpp>
40
-
41
- #include <algorithm>
42
- #include <exception>
43
- #include <sstream>
44
- #include <string>
45
- #include <utility>
46
- #include <vector>
47
-
48
- namespace websocketpp {
49
-
50
- namespace istate = session::internal_state;
51
-
52
- template <typename config>
53
- void connection<config>::set_termination_handler(
54
- termination_handler new_handler)
55
- {
56
- m_alog->write(log::alevel::devel,
57
- "connection set_termination_handler");
58
-
59
- //scoped_lock_type lock(m_connection_state_lock);
60
-
61
- m_termination_handler = new_handler;
62
- }
63
-
64
- template <typename config>
65
- std::string const & connection<config>::get_origin() const {
66
- //scoped_lock_type lock(m_connection_state_lock);
67
- return m_processor->get_origin(m_request);
68
- }
69
-
70
- template <typename config>
71
- size_t connection<config>::get_buffered_amount() const {
72
- //scoped_lock_type lock(m_connection_state_lock);
73
- return m_send_buffer_size;
74
- }
75
-
76
- template <typename config>
77
- session::state::value connection<config>::get_state() const {
78
- //scoped_lock_type lock(m_connection_state_lock);
79
- return m_state;
80
- }
81
-
82
- template <typename config>
83
- lib::error_code connection<config>::send(std::string const & payload,
84
- frame::opcode::value op)
85
- {
86
- message_ptr msg = m_msg_manager->get_message(op,payload.size());
87
- msg->append_payload(payload);
88
- msg->set_compressed(true);
89
-
90
- return send(msg);
91
- }
92
-
93
- template <typename config>
94
- lib::error_code connection<config>::send(void const * payload, size_t len,
95
- frame::opcode::value op)
96
- {
97
- message_ptr msg = m_msg_manager->get_message(op,len);
98
- msg->append_payload(payload,len);
99
-
100
- return send(msg);
101
- }
102
-
103
- template <typename config>
104
- lib::error_code connection<config>::send(typename config::message_type::ptr msg)
105
- {
106
- if (m_alog->static_test(log::alevel::devel)) {
107
- m_alog->write(log::alevel::devel,"connection send");
108
- }
109
-
110
- {
111
- scoped_lock_type lock(m_connection_state_lock);
112
- if (m_state != session::state::open) {
113
- return error::make_error_code(error::invalid_state);
114
- }
115
- }
116
-
117
- message_ptr outgoing_msg;
118
- bool needs_writing = false;
119
-
120
- if (msg->get_prepared()) {
121
- outgoing_msg = msg;
122
-
123
- scoped_lock_type lock(m_write_lock);
124
- write_push(outgoing_msg);
125
- needs_writing = !m_write_flag && !m_send_queue.empty();
126
- } else {
127
- outgoing_msg = m_msg_manager->get_message();
128
-
129
- if (!outgoing_msg) {
130
- return error::make_error_code(error::no_outgoing_buffers);
131
- }
132
-
133
- scoped_lock_type lock(m_write_lock);
134
- lib::error_code ec = m_processor->prepare_data_frame(msg,outgoing_msg);
135
-
136
- if (ec) {
137
- return ec;
138
- }
139
-
140
- write_push(outgoing_msg);
141
- needs_writing = !m_write_flag && !m_send_queue.empty();
142
- }
143
-
144
- if (needs_writing) {
145
- transport_con_type::dispatch(lib::bind(
146
- &type::write_frame,
147
- type::get_shared()
148
- ));
149
- }
150
-
151
- return lib::error_code();
152
- }
153
-
154
- template <typename config>
155
- void connection<config>::ping(std::string const& payload, lib::error_code& ec) {
156
- if (m_alog->static_test(log::alevel::devel)) {
157
- m_alog->write(log::alevel::devel,"connection ping");
158
- }
159
-
160
- {
161
- scoped_lock_type lock(m_connection_state_lock);
162
- if (m_state != session::state::open) {
163
- std::stringstream ss;
164
- ss << "connection::ping called from invalid state " << m_state;
165
- m_alog->write(log::alevel::devel,ss.str());
166
- ec = error::make_error_code(error::invalid_state);
167
- return;
168
- }
169
- }
170
-
171
- message_ptr msg = m_msg_manager->get_message();
172
- if (!msg) {
173
- ec = error::make_error_code(error::no_outgoing_buffers);
174
- return;
175
- }
176
-
177
- ec = m_processor->prepare_ping(payload,msg);
178
- if (ec) {return;}
179
-
180
- // set ping timer if we are listening for one
181
- if (m_pong_timeout_handler) {
182
- // Cancel any existing timers
183
- if (m_ping_timer) {
184
- m_ping_timer->cancel();
185
- }
186
-
187
- if (m_pong_timeout_dur > 0) {
188
- m_ping_timer = transport_con_type::set_timer(
189
- m_pong_timeout_dur,
190
- lib::bind(
191
- &type::handle_pong_timeout,
192
- type::get_shared(),
193
- payload,
194
- lib::placeholders::_1
195
- )
196
- );
197
- }
198
-
199
- if (!m_ping_timer) {
200
- // Our transport doesn't support timers
201
- m_elog->write(log::elevel::warn,"Warning: a pong_timeout_handler is \
202
- set but the transport in use does not support timeouts.");
203
- }
204
- }
205
-
206
- bool needs_writing = false;
207
- {
208
- scoped_lock_type lock(m_write_lock);
209
- write_push(msg);
210
- needs_writing = !m_write_flag && !m_send_queue.empty();
211
- }
212
-
213
- if (needs_writing) {
214
- transport_con_type::dispatch(lib::bind(
215
- &type::write_frame,
216
- type::get_shared()
217
- ));
218
- }
219
-
220
- ec = lib::error_code();
221
- }
222
-
223
- template<typename config>
224
- void connection<config>::ping(std::string const & payload) {
225
- lib::error_code ec;
226
- ping(payload,ec);
227
- if (ec) {
228
- throw exception(ec);
229
- }
230
- }
231
-
232
- template<typename config>
233
- void connection<config>::handle_pong_timeout(std::string payload,
234
- lib::error_code const & ec)
235
- {
236
- if (ec) {
237
- if (ec == transport::error::operation_aborted) {
238
- // ignore, this is expected
239
- return;
240
- }
241
-
242
- m_elog->write(log::elevel::devel,"pong_timeout error: "+ec.message());
243
- return;
244
- }
245
-
246
- if (m_pong_timeout_handler) {
247
- m_pong_timeout_handler(m_connection_hdl,payload);
248
- }
249
- }
250
-
251
- template <typename config>
252
- void connection<config>::pong(std::string const& payload, lib::error_code& ec) {
253
- if (m_alog->static_test(log::alevel::devel)) {
254
- m_alog->write(log::alevel::devel,"connection pong");
255
- }
256
-
257
- {
258
- scoped_lock_type lock(m_connection_state_lock);
259
- if (m_state != session::state::open) {
260
- std::stringstream ss;
261
- ss << "connection::pong called from invalid state " << m_state;
262
- m_alog->write(log::alevel::devel,ss.str());
263
- ec = error::make_error_code(error::invalid_state);
264
- return;
265
- }
266
- }
267
-
268
- message_ptr msg = m_msg_manager->get_message();
269
- if (!msg) {
270
- ec = error::make_error_code(error::no_outgoing_buffers);
271
- return;
272
- }
273
-
274
- ec = m_processor->prepare_pong(payload,msg);
275
- if (ec) {return;}
276
-
277
- bool needs_writing = false;
278
- {
279
- scoped_lock_type lock(m_write_lock);
280
- write_push(msg);
281
- needs_writing = !m_write_flag && !m_send_queue.empty();
282
- }
283
-
284
- if (needs_writing) {
285
- transport_con_type::dispatch(lib::bind(
286
- &type::write_frame,
287
- type::get_shared()
288
- ));
289
- }
290
-
291
- ec = lib::error_code();
292
- }
293
-
294
- template<typename config>
295
- void connection<config>::pong(std::string const & payload) {
296
- lib::error_code ec;
297
- pong(payload,ec);
298
- if (ec) {
299
- throw exception(ec);
300
- }
301
- }
302
-
303
- template <typename config>
304
- void connection<config>::close(close::status::value const code,
305
- std::string const & reason, lib::error_code & ec)
306
- {
307
- if (m_alog->static_test(log::alevel::devel)) {
308
- m_alog->write(log::alevel::devel,"connection close");
309
- }
310
-
311
- // Truncate reason to maximum size allowable in a close frame.
312
- std::string tr(reason,0,std::min<size_t>(reason.size(),
313
- frame::limits::close_reason_size));
314
-
315
- scoped_lock_type lock(m_connection_state_lock);
316
-
317
- if (m_state != session::state::open) {
318
- ec = error::make_error_code(error::invalid_state);
319
- return;
320
- }
321
-
322
- ec = this->send_close_frame(code,tr,false,close::status::terminal(code));
323
- }
324
-
325
- template<typename config>
326
- void connection<config>::close(close::status::value const code,
327
- std::string const & reason)
328
- {
329
- lib::error_code ec;
330
- close(code,reason,ec);
331
- if (ec) {
332
- throw exception(ec);
333
- }
334
- }
335
-
336
- /// Trigger the on_interrupt handler
337
- /**
338
- * This is thread safe if the transport is thread safe
339
- */
340
- template <typename config>
341
- lib::error_code connection<config>::interrupt() {
342
- m_alog->write(log::alevel::devel,"connection connection::interrupt");
343
- return transport_con_type::interrupt(
344
- lib::bind(
345
- &type::handle_interrupt,
346
- type::get_shared()
347
- )
348
- );
349
- }
350
-
351
-
352
- template <typename config>
353
- void connection<config>::handle_interrupt() {
354
- if (m_interrupt_handler) {
355
- m_interrupt_handler(m_connection_hdl);
356
- }
357
- }
358
-
359
- template <typename config>
360
- lib::error_code connection<config>::pause_reading() {
361
- m_alog->write(log::alevel::devel,"connection connection::pause_reading");
362
- return transport_con_type::dispatch(
363
- lib::bind(
364
- &type::handle_pause_reading,
365
- type::get_shared()
366
- )
367
- );
368
- }
369
-
370
- /// Pause reading handler. Not safe to call directly
371
- template <typename config>
372
- void connection<config>::handle_pause_reading() {
373
- m_alog->write(log::alevel::devel,"connection connection::handle_pause_reading");
374
- m_read_flag = false;
375
- }
376
-
377
- template <typename config>
378
- lib::error_code connection<config>::resume_reading() {
379
- m_alog->write(log::alevel::devel,"connection connection::resume_reading");
380
- return transport_con_type::dispatch(
381
- lib::bind(
382
- &type::handle_resume_reading,
383
- type::get_shared()
384
- )
385
- );
386
- }
387
-
388
- /// Resume reading helper method. Not safe to call directly
389
- template <typename config>
390
- void connection<config>::handle_resume_reading() {
391
- m_read_flag = true;
392
- read_frame();
393
- }
394
-
395
-
396
-
397
-
398
-
399
-
400
-
401
-
402
-
403
-
404
-
405
- template <typename config>
406
- bool connection<config>::get_secure() const {
407
- //scoped_lock_type lock(m_connection_state_lock);
408
- return m_uri->get_secure();
409
- }
410
-
411
- template <typename config>
412
- std::string const & connection<config>::get_host() const {
413
- //scoped_lock_type lock(m_connection_state_lock);
414
- return m_uri->get_host();
415
- }
416
-
417
- template <typename config>
418
- std::string const & connection<config>::get_resource() const {
419
- //scoped_lock_type lock(m_connection_state_lock);
420
- return m_uri->get_resource();
421
- }
422
-
423
- template <typename config>
424
- uint16_t connection<config>::get_port() const {
425
- //scoped_lock_type lock(m_connection_state_lock);
426
- return m_uri->get_port();
427
- }
428
-
429
- template <typename config>
430
- uri_ptr connection<config>::get_uri() const {
431
- //scoped_lock_type lock(m_connection_state_lock);
432
- return m_uri;
433
- }
434
-
435
- template <typename config>
436
- void connection<config>::set_uri(uri_ptr uri) {
437
- //scoped_lock_type lock(m_connection_state_lock);
438
- m_uri = uri;
439
- }
440
-
441
-
442
-
443
-
444
-
445
-
446
- template <typename config>
447
- std::string const & connection<config>::get_subprotocol() const {
448
- return m_subprotocol;
449
- }
450
-
451
- template <typename config>
452
- std::vector<std::string> const &
453
- connection<config>::get_requested_subprotocols() const {
454
- return m_requested_subprotocols;
455
- }
456
-
457
- template <typename config>
458
- void connection<config>::add_subprotocol(std::string const & value,
459
- lib::error_code & ec)
460
- {
461
- if (m_is_server) {
462
- ec = error::make_error_code(error::client_only);
463
- return;
464
- }
465
-
466
- // If the value is empty or has a non-RFC2616 token character it is invalid.
467
- if (value.empty() || std::find_if(value.begin(),value.end(),
468
- http::is_not_token_char) != value.end())
469
- {
470
- ec = error::make_error_code(error::invalid_subprotocol);
471
- return;
472
- }
473
-
474
- m_requested_subprotocols.push_back(value);
475
- }
476
-
477
- template <typename config>
478
- void connection<config>::add_subprotocol(std::string const & value) {
479
- lib::error_code ec;
480
- this->add_subprotocol(value,ec);
481
- if (ec) {
482
- throw exception(ec);
483
- }
484
- }
485
-
486
-
487
- template <typename config>
488
- void connection<config>::select_subprotocol(std::string const & value,
489
- lib::error_code & ec)
490
- {
491
- if (!m_is_server) {
492
- ec = error::make_error_code(error::server_only);
493
- return;
494
- }
495
-
496
- if (value.empty()) {
497
- ec = lib::error_code();
498
- return;
499
- }
500
-
501
- std::vector<std::string>::iterator it;
502
-
503
- it = std::find(m_requested_subprotocols.begin(),
504
- m_requested_subprotocols.end(),
505
- value);
506
-
507
- if (it == m_requested_subprotocols.end()) {
508
- ec = error::make_error_code(error::unrequested_subprotocol);
509
- return;
510
- }
511
-
512
- m_subprotocol = value;
513
- }
514
-
515
- template <typename config>
516
- void connection<config>::select_subprotocol(std::string const & value) {
517
- lib::error_code ec;
518
- this->select_subprotocol(value,ec);
519
- if (ec) {
520
- throw exception(ec);
521
- }
522
- }
523
-
524
-
525
- template <typename config>
526
- std::string const &
527
- connection<config>::get_request_header(std::string const & key) const {
528
- return m_request.get_header(key);
529
- }
530
-
531
- template <typename config>
532
- std::string const &
533
- connection<config>::get_request_body() const {
534
- return m_request.get_body();
535
- }
536
-
537
- template <typename config>
538
- std::string const &
539
- connection<config>::get_response_header(std::string const & key) const {
540
- return m_response.get_header(key);
541
- }
542
-
543
- // TODO: EXCEPTION_FREE
544
- template <typename config>
545
- void connection<config>::set_status(http::status_code::value code)
546
- {
547
- if (m_internal_state != istate::PROCESS_HTTP_REQUEST) {
548
- throw exception("Call to set_status from invalid state",
549
- error::make_error_code(error::invalid_state));
550
- }
551
- m_response.set_status(code);
552
- }
553
-
554
- // TODO: EXCEPTION_FREE
555
- template <typename config>
556
- void connection<config>::set_status(http::status_code::value code,
557
- std::string const & msg)
558
- {
559
- if (m_internal_state != istate::PROCESS_HTTP_REQUEST) {
560
- throw exception("Call to set_status from invalid state",
561
- error::make_error_code(error::invalid_state));
562
- }
563
-
564
- m_response.set_status(code,msg);
565
- }
566
-
567
- // TODO: EXCEPTION_FREE
568
- template <typename config>
569
- void connection<config>::set_body(std::string const & value) {
570
- if (m_internal_state != istate::PROCESS_HTTP_REQUEST) {
571
- throw exception("Call to set_status from invalid state",
572
- error::make_error_code(error::invalid_state));
573
- }
574
-
575
- m_response.set_body(value);
576
- }
577
-
578
- // TODO: EXCEPTION_FREE
579
- template <typename config>
580
- void connection<config>::append_header(std::string const & key,
581
- std::string const & val)
582
- {
583
- if (m_is_server) {
584
- if (m_internal_state == istate::PROCESS_HTTP_REQUEST) {
585
- // we are setting response headers for an incoming server connection
586
- m_response.append_header(key,val);
587
- } else {
588
- throw exception("Call to append_header from invalid state",
589
- error::make_error_code(error::invalid_state));
590
- }
591
- } else {
592
- if (m_internal_state == istate::USER_INIT) {
593
- // we are setting initial headers for an outgoing client connection
594
- m_request.append_header(key,val);
595
- } else {
596
- throw exception("Call to append_header from invalid state",
597
- error::make_error_code(error::invalid_state));
598
- }
599
- }
600
- }
601
-
602
- // TODO: EXCEPTION_FREE
603
- template <typename config>
604
- void connection<config>::replace_header(std::string const & key,
605
- std::string const & val)
606
- {
607
- if (m_is_server) {
608
- if (m_internal_state == istate::PROCESS_HTTP_REQUEST) {
609
- // we are setting response headers for an incoming server connection
610
- m_response.replace_header(key,val);
611
- } else {
612
- throw exception("Call to replace_header from invalid state",
613
- error::make_error_code(error::invalid_state));
614
- }
615
- } else {
616
- if (m_internal_state == istate::USER_INIT) {
617
- // we are setting initial headers for an outgoing client connection
618
- m_request.replace_header(key,val);
619
- } else {
620
- throw exception("Call to replace_header from invalid state",
621
- error::make_error_code(error::invalid_state));
622
- }
623
- }
624
- }
625
-
626
- // TODO: EXCEPTION_FREE
627
- template <typename config>
628
- void connection<config>::remove_header(std::string const & key)
629
- {
630
- if (m_is_server) {
631
- if (m_internal_state == istate::PROCESS_HTTP_REQUEST) {
632
- // we are setting response headers for an incoming server connection
633
- m_response.remove_header(key);
634
- } else {
635
- throw exception("Call to remove_header from invalid state",
636
- error::make_error_code(error::invalid_state));
637
- }
638
- } else {
639
- if (m_internal_state == istate::USER_INIT) {
640
- // we are setting initial headers for an outgoing client connection
641
- m_request.remove_header(key);
642
- } else {
643
- throw exception("Call to remove_header from invalid state",
644
- error::make_error_code(error::invalid_state));
645
- }
646
- }
647
- }
648
-
649
- /// Defer HTTP Response until later
650
- /**
651
- * Used in the http handler to defer the HTTP response for this connection
652
- * until later. Handshake timers will be canceled and the connection will be
653
- * left open until `send_http_response` or an equivalent is called.
654
- *
655
- * Warning: deferred connections won't time out and as a result can tie up
656
- * resources.
657
- *
658
- * @return A status code, zero on success, non-zero otherwise
659
- */
660
- template <typename config>
661
- lib::error_code connection<config>::defer_http_response() {
662
- // Cancel handshake timer, otherwise the connection will time out and we'll
663
- // close the connection before the app has a chance to send a response.
664
- if (m_handshake_timer) {
665
- m_handshake_timer->cancel();
666
- m_handshake_timer.reset();
667
- }
668
-
669
- // Do something to signal deferral
670
- m_http_state = session::http_state::deferred;
671
-
672
- return lib::error_code();
673
- }
674
-
675
- /// Send deferred HTTP Response (exception free)
676
- /**
677
- * Sends an http response to an HTTP connection that was deferred. This will
678
- * send a complete response including all headers, status line, and body
679
- * text. The connection will be closed afterwards.
680
- *
681
- * @since 0.6.0
682
- *
683
- * @param ec A status code, zero on success, non-zero otherwise
684
- */
685
- template <typename config>
686
- void connection<config>::send_http_response(lib::error_code & ec) {
687
- {
688
- scoped_lock_type lock(m_connection_state_lock);
689
- if (m_http_state != session::http_state::deferred) {
690
- ec = error::make_error_code(error::invalid_state);
691
- return;
692
- }
693
-
694
- m_http_state = session::http_state::body_written;
695
- }
696
-
697
- this->write_http_response(lib::error_code());
698
- ec = lib::error_code();
699
- }
700
-
701
- template <typename config>
702
- void connection<config>::send_http_response() {
703
- lib::error_code ec;
704
- this->send_http_response(ec);
705
- if (ec) {
706
- throw exception(ec);
707
- }
708
- }
709
-
710
-
711
-
712
-
713
- /******** logic thread ********/
714
-
715
- template <typename config>
716
- void connection<config>::start() {
717
- m_alog->write(log::alevel::devel,"connection start");
718
-
719
- if (m_internal_state != istate::USER_INIT) {
720
- m_alog->write(log::alevel::devel,"Start called in invalid state");
721
- this->terminate(error::make_error_code(error::invalid_state));
722
- return;
723
- }
724
-
725
- m_internal_state = istate::TRANSPORT_INIT;
726
-
727
- // Depending on how the transport implements init this function may return
728
- // immediately and call handle_transport_init later or call
729
- // handle_transport_init from this function.
730
- transport_con_type::init(
731
- lib::bind(
732
- &type::handle_transport_init,
733
- type::get_shared(),
734
- lib::placeholders::_1
735
- )
736
- );
737
- }
738
-
739
- template <typename config>
740
- void connection<config>::handle_transport_init(lib::error_code const & ec) {
741
- m_alog->write(log::alevel::devel,"connection handle_transport_init");
742
-
743
- lib::error_code ecm = ec;
744
-
745
- if (m_internal_state != istate::TRANSPORT_INIT) {
746
- m_alog->write(log::alevel::devel,
747
- "handle_transport_init must be called from transport init state");
748
- ecm = error::make_error_code(error::invalid_state);
749
- }
750
-
751
- if (ecm) {
752
- std::stringstream s;
753
- s << "handle_transport_init received error: "<< ecm.message();
754
- m_elog->write(log::elevel::rerror,s.str());
755
-
756
- this->terminate(ecm);
757
- return;
758
- }
759
-
760
- // At this point the transport is ready to read and write bytes.
761
- if (m_is_server) {
762
- m_internal_state = istate::READ_HTTP_REQUEST;
763
- this->read_handshake(1);
764
- } else {
765
- // We are a client. Set the processor to the version specified in the
766
- // config file and send a handshake request.
767
- m_internal_state = istate::WRITE_HTTP_REQUEST;
768
- m_processor = get_processor(config::client_version);
769
- this->send_http_request();
770
- }
771
- }
772
-
773
- template <typename config>
774
- void connection<config>::read_handshake(size_t num_bytes) {
775
- m_alog->write(log::alevel::devel,"connection read_handshake");
776
-
777
- if (m_open_handshake_timeout_dur > 0) {
778
- m_handshake_timer = transport_con_type::set_timer(
779
- m_open_handshake_timeout_dur,
780
- lib::bind(
781
- &type::handle_open_handshake_timeout,
782
- type::get_shared(),
783
- lib::placeholders::_1
784
- )
785
- );
786
- }
787
-
788
- transport_con_type::async_read_at_least(
789
- num_bytes,
790
- m_buf,
791
- config::connection_read_buffer_size,
792
- lib::bind(
793
- &type::handle_read_handshake,
794
- type::get_shared(),
795
- lib::placeholders::_1,
796
- lib::placeholders::_2
797
- )
798
- );
799
- }
800
-
801
- // All exit paths for this function need to call write_http_response() or submit
802
- // a new read request with this function as the handler.
803
- template <typename config>
804
- void connection<config>::handle_read_handshake(lib::error_code const & ec,
805
- size_t bytes_transferred)
806
- {
807
- m_alog->write(log::alevel::devel,"connection handle_read_handshake");
808
-
809
- lib::error_code ecm = ec;
810
-
811
- if (!ecm) {
812
- scoped_lock_type lock(m_connection_state_lock);
813
-
814
- if (m_state == session::state::connecting) {
815
- if (m_internal_state != istate::READ_HTTP_REQUEST) {
816
- ecm = error::make_error_code(error::invalid_state);
817
- }
818
- } else if (m_state == session::state::closed) {
819
- // The connection was canceled while the response was being sent,
820
- // usually by the handshake timer. This is basically expected
821
- // (though hopefully rare) and there is nothing we can do so ignore.
822
- m_alog->write(log::alevel::devel,
823
- "handle_read_handshake invoked after connection was closed");
824
- return;
825
- } else {
826
- ecm = error::make_error_code(error::invalid_state);
827
- }
828
- }
829
-
830
- if (ecm) {
831
- if (ecm == transport::error::eof && m_state == session::state::closed) {
832
- // we expect to get eof if the connection is closed already
833
- m_alog->write(log::alevel::devel,
834
- "got (expected) eof/state error from closed con");
835
- return;
836
- }
837
-
838
- log_err(log::elevel::rerror,"handle_read_handshake",ecm);
839
- this->terminate(ecm);
840
- return;
841
- }
842
-
843
- // Boundaries checking. TODO: How much of this should be done?
844
- if (bytes_transferred > config::connection_read_buffer_size) {
845
- m_elog->write(log::elevel::fatal,"Fatal boundaries checking error.");
846
- this->terminate(make_error_code(error::general));
847
- return;
848
- }
849
-
850
- size_t bytes_processed = 0;
851
- try {
852
- bytes_processed = m_request.consume(m_buf,bytes_transferred);
853
- } catch (http::exception &e) {
854
- // All HTTP exceptions will result in this request failing and an error
855
- // response being returned. No more bytes will be read in this con.
856
- m_response.set_status(e.m_error_code,e.m_error_msg);
857
- this->write_http_response_error(error::make_error_code(error::http_parse_error));
858
- return;
859
- }
860
-
861
- // More paranoid boundaries checking.
862
- // TODO: Is this overkill?
863
- if (bytes_processed > bytes_transferred) {
864
- m_elog->write(log::elevel::fatal,"Fatal boundaries checking error.");
865
- this->terminate(make_error_code(error::general));
866
- return;
867
- }
868
-
869
- if (m_alog->static_test(log::alevel::devel)) {
870
- std::stringstream s;
871
- s << "bytes_transferred: " << bytes_transferred
872
- << " bytes, bytes processed: " << bytes_processed << " bytes";
873
- m_alog->write(log::alevel::devel,s.str());
874
- }
875
-
876
- if (m_request.ready()) {
877
- lib::error_code processor_ec = this->initialize_processor();
878
- if (processor_ec) {
879
- this->write_http_response_error(processor_ec);
880
- return;
881
- }
882
-
883
- if (m_processor && m_processor->get_version() == 0) {
884
- // Version 00 has an extra requirement to read some bytes after the
885
- // handshake
886
- if (bytes_transferred-bytes_processed >= 8) {
887
- m_request.replace_header(
888
- "Sec-WebSocket-Key3",
889
- std::string(m_buf+bytes_processed,m_buf+bytes_processed+8)
890
- );
891
- bytes_processed += 8;
892
- } else {
893
- // TODO: need more bytes
894
- m_alog->write(log::alevel::devel,"short key3 read");
895
- m_response.set_status(http::status_code::internal_server_error);
896
- this->write_http_response_error(processor::error::make_error_code(processor::error::short_key3));
897
- return;
898
- }
899
- }
900
-
901
- if (m_alog->static_test(log::alevel::devel)) {
902
- m_alog->write(log::alevel::devel,m_request.raw());
903
- if (!m_request.get_header("Sec-WebSocket-Key3").empty()) {
904
- m_alog->write(log::alevel::devel,
905
- utility::to_hex(m_request.get_header("Sec-WebSocket-Key3")));
906
- }
907
- }
908
-
909
- // The remaining bytes in m_buf are frame data. Copy them to the
910
- // beginning of the buffer and note the length. They will be read after
911
- // the handshake completes and before more bytes are read.
912
- std::copy(m_buf+bytes_processed,m_buf+bytes_transferred,m_buf);
913
- m_buf_cursor = bytes_transferred-bytes_processed;
914
-
915
-
916
- m_internal_state = istate::PROCESS_HTTP_REQUEST;
917
-
918
- // We have the complete request. Process it.
919
- lib::error_code handshake_ec = this->process_handshake_request();
920
-
921
- // Write a response if this is a websocket connection or if it is an
922
- // HTTP connection for which the response has not been deferred or
923
- // started yet by a different system (i.e. still in init state).
924
- if (!m_is_http || m_http_state == session::http_state::init) {
925
- this->write_http_response(handshake_ec);
926
- }
927
- } else {
928
- // read at least 1 more byte
929
- transport_con_type::async_read_at_least(
930
- 1,
931
- m_buf,
932
- config::connection_read_buffer_size,
933
- lib::bind(
934
- &type::handle_read_handshake,
935
- type::get_shared(),
936
- lib::placeholders::_1,
937
- lib::placeholders::_2
938
- )
939
- );
940
- }
941
- }
942
-
943
- // write_http_response requires the request to be fully read and the connection
944
- // to be in the PROCESS_HTTP_REQUEST state. In some cases we can detect errors
945
- // before the request is fully read (specifically at a point where we aren't
946
- // sure if the hybi00 key3 bytes need to be read). This method sets the correct
947
- // state and calls write_http_response
948
- template <typename config>
949
- void connection<config>::write_http_response_error(lib::error_code const & ec) {
950
- if (m_internal_state != istate::READ_HTTP_REQUEST) {
951
- m_alog->write(log::alevel::devel,
952
- "write_http_response_error called in invalid state");
953
- this->terminate(error::make_error_code(error::invalid_state));
954
- return;
955
- }
956
-
957
- m_internal_state = istate::PROCESS_HTTP_REQUEST;
958
-
959
- this->write_http_response(ec);
960
- }
961
-
962
- // All exit paths for this function need to call write_http_response() or submit
963
- // a new read request with this function as the handler.
964
- template <typename config>
965
- void connection<config>::handle_read_frame(lib::error_code const & ec,
966
- size_t bytes_transferred)
967
- {
968
- //m_alog->write(log::alevel::devel,"connection handle_read_frame");
969
-
970
- lib::error_code ecm = ec;
971
-
972
- if (!ecm && m_internal_state != istate::PROCESS_CONNECTION) {
973
- ecm = error::make_error_code(error::invalid_state);
974
- }
975
-
976
- if (ecm) {
977
- log::level echannel = log::elevel::rerror;
978
-
979
- if (ecm == transport::error::eof) {
980
- if (m_state == session::state::closed) {
981
- // we expect to get eof if the connection is closed already
982
- // just ignore it
983
- m_alog->write(log::alevel::devel,"got eof from closed con");
984
- return;
985
- } else if (m_state == session::state::closing && !m_is_server) {
986
- // If we are a client we expect to get eof in the closing state,
987
- // this is a signal to terminate our end of the connection after
988
- // the closing handshake
989
- terminate(lib::error_code());
990
- return;
991
- }
992
- } else if (ecm == error::invalid_state) {
993
- // In general, invalid state errors in the closed state are the
994
- // result of handlers that were in the system already when the state
995
- // changed and should be ignored as they pose no problems and there
996
- // is nothing useful that we can do about them.
997
- if (m_state == session::state::closed) {
998
- m_alog->write(log::alevel::devel,
999
- "handle_read_frame: got invalid istate in closed state");
1000
- return;
1001
- }
1002
- } else if (ecm == transport::error::action_after_shutdown) {
1003
- echannel = log::elevel::info;
1004
- } else {
1005
- // TODO: more generally should we do something different here in the
1006
- // case that m_state is cosed? Are errors after the connection is
1007
- // already closed really an rerror?
1008
- }
1009
-
1010
-
1011
-
1012
- log_err(echannel, "handle_read_frame", ecm);
1013
- this->terminate(ecm);
1014
- return;
1015
- }
1016
-
1017
- // Boundaries checking. TODO: How much of this should be done?
1018
- /*if (bytes_transferred > config::connection_read_buffer_size) {
1019
- m_elog->write(log::elevel::fatal,"Fatal boundaries checking error");
1020
- this->terminate(make_error_code(error::general));
1021
- return;
1022
- }*/
1023
-
1024
- size_t p = 0;
1025
-
1026
- if (m_alog->static_test(log::alevel::devel)) {
1027
- std::stringstream s;
1028
- s << "p = " << p << " bytes transferred = " << bytes_transferred;
1029
- m_alog->write(log::alevel::devel,s.str());
1030
- }
1031
-
1032
- while (p < bytes_transferred) {
1033
- if (m_alog->static_test(log::alevel::devel)) {
1034
- std::stringstream s;
1035
- s << "calling consume with " << bytes_transferred-p << " bytes";
1036
- m_alog->write(log::alevel::devel,s.str());
1037
- }
1038
-
1039
- lib::error_code consume_ec;
1040
-
1041
- if (m_alog->static_test(log::alevel::devel)) {
1042
- std::stringstream s;
1043
- s << "Processing Bytes: " << utility::to_hex(reinterpret_cast<uint8_t*>(m_buf)+p,bytes_transferred-p);
1044
- m_alog->write(log::alevel::devel,s.str());
1045
- }
1046
-
1047
- p += m_processor->consume(
1048
- reinterpret_cast<uint8_t*>(m_buf)+p,
1049
- bytes_transferred-p,
1050
- consume_ec
1051
- );
1052
-
1053
- if (m_alog->static_test(log::alevel::devel)) {
1054
- std::stringstream s;
1055
- s << "bytes left after consume: " << bytes_transferred-p;
1056
- m_alog->write(log::alevel::devel,s.str());
1057
- }
1058
- if (consume_ec) {
1059
- log_err(log::elevel::rerror, "consume", consume_ec);
1060
-
1061
- if (config::drop_on_protocol_error) {
1062
- this->terminate(consume_ec);
1063
- return;
1064
- } else {
1065
- lib::error_code close_ec;
1066
- this->close(
1067
- processor::error::to_ws(consume_ec),
1068
- consume_ec.message(),
1069
- close_ec
1070
- );
1071
-
1072
- if (close_ec) {
1073
- log_err(log::elevel::fatal, "Protocol error close frame ", close_ec);
1074
- this->terminate(close_ec);
1075
- return;
1076
- }
1077
- }
1078
- return;
1079
- }
1080
-
1081
- if (m_processor->ready()) {
1082
- if (m_alog->static_test(log::alevel::devel)) {
1083
- std::stringstream s;
1084
- s << "Complete message received. Dispatching";
1085
- m_alog->write(log::alevel::devel,s.str());
1086
- }
1087
-
1088
- message_ptr msg = m_processor->get_message();
1089
-
1090
- if (!msg) {
1091
- m_alog->write(log::alevel::devel, "null message from m_processor");
1092
- } else if (!is_control(msg->get_opcode())) {
1093
- // data message, dispatch to user
1094
- if (m_state != session::state::open) {
1095
- m_elog->write(log::elevel::warn, "got non-close frame while closing");
1096
- } else if (m_message_handler) {
1097
- m_message_handler(m_connection_hdl, msg);
1098
- }
1099
- } else {
1100
- process_control_frame(msg);
1101
- }
1102
- }
1103
- }
1104
-
1105
- read_frame();
1106
- }
1107
-
1108
- /// Issue a new transport read unless reading is paused.
1109
- template <typename config>
1110
- void connection<config>::read_frame() {
1111
- if (!m_read_flag) {
1112
- return;
1113
- }
1114
-
1115
- transport_con_type::async_read_at_least(
1116
- // std::min wont work with undefined static const values.
1117
- // TODO: is there a more elegant way to do this?
1118
- // Need to determine if requesting 1 byte or the exact number of bytes
1119
- // is better here. 1 byte lets us be a bit more responsive at a
1120
- // potential expense of additional runs through handle_read_frame
1121
- /*(m_processor->get_bytes_needed() > config::connection_read_buffer_size ?
1122
- config::connection_read_buffer_size : m_processor->get_bytes_needed())*/
1123
- 1,
1124
- m_buf,
1125
- config::connection_read_buffer_size,
1126
- m_handle_read_frame
1127
- );
1128
- }
1129
-
1130
- template <typename config>
1131
- lib::error_code connection<config>::initialize_processor() {
1132
- m_alog->write(log::alevel::devel,"initialize_processor");
1133
-
1134
- // if it isn't a websocket handshake nothing to do.
1135
- if (!processor::is_websocket_handshake(m_request)) {
1136
- return lib::error_code();
1137
- }
1138
-
1139
- int version = processor::get_websocket_version(m_request);
1140
-
1141
- if (version < 0) {
1142
- m_alog->write(log::alevel::devel, "BAD REQUEST: can't determine version");
1143
- m_response.set_status(http::status_code::bad_request);
1144
- return error::make_error_code(error::invalid_version);
1145
- }
1146
-
1147
- m_processor = get_processor(version);
1148
-
1149
- // if the processor is not null we are done
1150
- if (m_processor) {
1151
- return lib::error_code();
1152
- }
1153
-
1154
- // We don't have a processor for this version. Return bad request
1155
- // with Sec-WebSocket-Version header filled with values we do accept
1156
- m_alog->write(log::alevel::devel, "BAD REQUEST: no processor for version");
1157
- m_response.set_status(http::status_code::bad_request);
1158
-
1159
- std::stringstream ss;
1160
- std::string sep;
1161
- std::vector<int>::const_iterator it;
1162
- for (it = versions_supported.begin(); it != versions_supported.end(); it++)
1163
- {
1164
- ss << sep << *it;
1165
- sep = ",";
1166
- }
1167
-
1168
- m_response.replace_header("Sec-WebSocket-Version",ss.str());
1169
- return error::make_error_code(error::unsupported_version);
1170
- }
1171
-
1172
- template <typename config>
1173
- lib::error_code connection<config>::process_handshake_request() {
1174
- m_alog->write(log::alevel::devel,"process handshake request");
1175
-
1176
- if (!processor::is_websocket_handshake(m_request)) {
1177
- // this is not a websocket handshake. Process as plain HTTP
1178
- m_alog->write(log::alevel::devel,"HTTP REQUEST");
1179
-
1180
- // extract URI from request
1181
- m_uri = processor::get_uri_from_host(
1182
- m_request,
1183
- (transport_con_type::is_secure() ? "https" : "http")
1184
- );
1185
-
1186
- if (!m_uri->get_valid()) {
1187
- m_alog->write(log::alevel::devel, "Bad request: failed to parse uri");
1188
- m_response.set_status(http::status_code::bad_request);
1189
- return error::make_error_code(error::invalid_uri);
1190
- }
1191
-
1192
- if (m_http_handler) {
1193
- m_is_http = true;
1194
- m_http_handler(m_connection_hdl);
1195
-
1196
- if (m_state == session::state::closed) {
1197
- return error::make_error_code(error::http_connection_ended);
1198
- }
1199
- } else {
1200
- set_status(http::status_code::upgrade_required);
1201
- return error::make_error_code(error::upgrade_required);
1202
- }
1203
-
1204
- return lib::error_code();
1205
- }
1206
-
1207
- lib::error_code ec = m_processor->validate_handshake(m_request);
1208
-
1209
- // Validate: make sure all required elements are present.
1210
- if (ec){
1211
- // Not a valid handshake request
1212
- m_alog->write(log::alevel::devel, "Bad request " + ec.message());
1213
- m_response.set_status(http::status_code::bad_request);
1214
- return ec;
1215
- }
1216
-
1217
- // Read extension parameters and set up values necessary for the end user
1218
- // to complete extension negotiation.
1219
- std::pair<lib::error_code,std::string> neg_results;
1220
- neg_results = m_processor->negotiate_extensions(m_request);
1221
-
1222
- if (neg_results.first == processor::error::make_error_code(processor::error::extension_parse_error)) {
1223
- // There was a fatal error in extension parsing that should result in
1224
- // a failed connection attempt.
1225
- m_elog->write(log::elevel::info, "Bad request: " + neg_results.first.message());
1226
- m_response.set_status(http::status_code::bad_request);
1227
- return neg_results.first;
1228
- } else if (neg_results.first) {
1229
- // There was a fatal error in extension processing that is probably our
1230
- // fault. Consider extension negotiation to have failed and continue as
1231
- // if extensions were not supported
1232
- m_elog->write(log::elevel::info,
1233
- "Extension negotiation failed: " + neg_results.first.message());
1234
- } else {
1235
- // extension negotiation succeeded, set response header accordingly
1236
- // we don't send an empty extensions header because it breaks many
1237
- // clients.
1238
- if (neg_results.second.size() > 0) {
1239
- m_response.replace_header("Sec-WebSocket-Extensions",
1240
- neg_results.second);
1241
- }
1242
- }
1243
-
1244
- // extract URI from request
1245
- m_uri = m_processor->get_uri(m_request);
1246
-
1247
-
1248
- if (!m_uri->get_valid()) {
1249
- m_alog->write(log::alevel::devel, "Bad request: failed to parse uri");
1250
- m_response.set_status(http::status_code::bad_request);
1251
- return error::make_error_code(error::invalid_uri);
1252
- }
1253
-
1254
- // extract subprotocols
1255
- lib::error_code subp_ec = m_processor->extract_subprotocols(m_request,
1256
- m_requested_subprotocols);
1257
-
1258
- if (subp_ec) {
1259
- // should we do anything?
1260
- }
1261
-
1262
- // Ask application to validate the connection
1263
- if (!m_validate_handler || m_validate_handler(m_connection_hdl)) {
1264
- m_response.set_status(http::status_code::switching_protocols);
1265
-
1266
- // Write the appropriate response headers based on request and
1267
- // processor version
1268
- ec = m_processor->process_handshake(m_request,m_subprotocol,m_response);
1269
-
1270
- if (ec) {
1271
- std::stringstream s;
1272
- s << "Processing error: " << ec << "(" << ec.message() << ")";
1273
- m_alog->write(log::alevel::devel, s.str());
1274
-
1275
- m_response.set_status(http::status_code::internal_server_error);
1276
- return ec;
1277
- }
1278
- } else {
1279
- // User application has rejected the handshake
1280
- m_alog->write(log::alevel::devel, "USER REJECT");
1281
-
1282
- // Use Bad Request if the user handler did not provide a more
1283
- // specific http response error code.
1284
- // TODO: is there a better default?
1285
- if (m_response.get_status_code() == http::status_code::uninitialized) {
1286
- m_response.set_status(http::status_code::bad_request);
1287
- }
1288
-
1289
- return error::make_error_code(error::rejected);
1290
- }
1291
-
1292
- return lib::error_code();
1293
- }
1294
-
1295
- template <typename config>
1296
- void connection<config>::write_http_response(lib::error_code const & ec) {
1297
- m_alog->write(log::alevel::devel,"connection write_http_response");
1298
-
1299
- if (ec == error::make_error_code(error::http_connection_ended)) {
1300
- m_alog->write(log::alevel::http,"An HTTP handler took over the connection.");
1301
- return;
1302
- }
1303
-
1304
- if (m_response.get_status_code() == http::status_code::uninitialized) {
1305
- m_response.set_status(http::status_code::internal_server_error);
1306
- m_ec = error::make_error_code(error::general);
1307
- } else {
1308
- m_ec = ec;
1309
- }
1310
-
1311
- m_response.set_version("HTTP/1.1");
1312
-
1313
- // Set server header based on the user agent settings
1314
- if (m_response.get_header("Server").empty()) {
1315
- if (!m_user_agent.empty()) {
1316
- m_response.replace_header("Server",m_user_agent);
1317
- } else {
1318
- m_response.remove_header("Server");
1319
- }
1320
- }
1321
-
1322
- // have the processor generate the raw bytes for the wire (if it exists)
1323
- if (m_processor) {
1324
- m_handshake_buffer = m_processor->get_raw(m_response);
1325
- } else {
1326
- // a processor wont exist for raw HTTP responses.
1327
- m_handshake_buffer = m_response.raw();
1328
- }
1329
-
1330
- if (m_alog->static_test(log::alevel::devel)) {
1331
- m_alog->write(log::alevel::devel,"Raw Handshake response:\n"+m_handshake_buffer);
1332
- if (!m_response.get_header("Sec-WebSocket-Key3").empty()) {
1333
- m_alog->write(log::alevel::devel,
1334
- utility::to_hex(m_response.get_header("Sec-WebSocket-Key3")));
1335
- }
1336
- }
1337
-
1338
- // write raw bytes
1339
- transport_con_type::async_write(
1340
- m_handshake_buffer.data(),
1341
- m_handshake_buffer.size(),
1342
- lib::bind(
1343
- &type::handle_write_http_response,
1344
- type::get_shared(),
1345
- lib::placeholders::_1
1346
- )
1347
- );
1348
- }
1349
-
1350
- template <typename config>
1351
- void connection<config>::handle_write_http_response(lib::error_code const & ec) {
1352
- m_alog->write(log::alevel::devel,"handle_write_http_response");
1353
-
1354
- lib::error_code ecm = ec;
1355
-
1356
- if (!ecm) {
1357
- scoped_lock_type lock(m_connection_state_lock);
1358
-
1359
- if (m_state == session::state::connecting) {
1360
- if (m_internal_state != istate::PROCESS_HTTP_REQUEST) {
1361
- ecm = error::make_error_code(error::invalid_state);
1362
- }
1363
- } else if (m_state == session::state::closed) {
1364
- // The connection was canceled while the response was being sent,
1365
- // usually by the handshake timer. This is basically expected
1366
- // (though hopefully rare) and there is nothing we can do so ignore.
1367
- m_alog->write(log::alevel::devel,
1368
- "handle_write_http_response invoked after connection was closed");
1369
- return;
1370
- } else {
1371
- ecm = error::make_error_code(error::invalid_state);
1372
- }
1373
- }
1374
-
1375
- if (ecm) {
1376
- if (ecm == transport::error::eof && m_state == session::state::closed) {
1377
- // we expect to get eof if the connection is closed already
1378
- m_alog->write(log::alevel::devel,
1379
- "got (expected) eof/state error from closed con");
1380
- return;
1381
- }
1382
-
1383
- log_err(log::elevel::rerror,"handle_write_http_response",ecm);
1384
- this->terminate(ecm);
1385
- return;
1386
- }
1387
-
1388
- if (m_handshake_timer) {
1389
- m_handshake_timer->cancel();
1390
- m_handshake_timer.reset();
1391
- }
1392
-
1393
- if (m_response.get_status_code() != http::status_code::switching_protocols)
1394
- {
1395
- /*if (m_processor || m_ec == error::http_parse_error ||
1396
- m_ec == error::invalid_version || m_ec == error::unsupported_version
1397
- || m_ec == error::upgrade_required)
1398
- {*/
1399
- if (!m_is_http) {
1400
- std::stringstream s;
1401
- s << "Handshake ended with HTTP error: "
1402
- << m_response.get_status_code();
1403
- m_elog->write(log::elevel::rerror,s.str());
1404
- } else {
1405
- // if this was not a websocket connection, we have written
1406
- // the expected response and the connection can be closed.
1407
-
1408
- this->log_http_result();
1409
-
1410
- if (m_ec) {
1411
- m_alog->write(log::alevel::devel,
1412
- "got to writing HTTP results with m_ec set: "+m_ec.message());
1413
- }
1414
- m_ec = make_error_code(error::http_connection_ended);
1415
- }
1416
-
1417
- this->terminate(m_ec);
1418
- return;
1419
- }
1420
-
1421
- this->log_open_result();
1422
-
1423
- m_internal_state = istate::PROCESS_CONNECTION;
1424
- m_state = session::state::open;
1425
-
1426
- if (m_open_handler) {
1427
- m_open_handler(m_connection_hdl);
1428
- }
1429
-
1430
- this->handle_read_frame(lib::error_code(), m_buf_cursor);
1431
- }
1432
-
1433
- template <typename config>
1434
- void connection<config>::send_http_request() {
1435
- m_alog->write(log::alevel::devel,"connection send_http_request");
1436
-
1437
- // TODO: origin header?
1438
-
1439
- // Have the protocol processor fill in the appropriate fields based on the
1440
- // selected client version
1441
- if (m_processor) {
1442
- lib::error_code ec;
1443
- ec = m_processor->client_handshake_request(m_request,m_uri,
1444
- m_requested_subprotocols);
1445
-
1446
- if (ec) {
1447
- log_err(log::elevel::fatal,"Internal library error: Processor",ec);
1448
- return;
1449
- }
1450
- } else {
1451
- m_elog->write(log::elevel::fatal,"Internal library error: missing processor");
1452
- return;
1453
- }
1454
-
1455
- // Unless the user has overridden the user agent, send generic WS++ UA.
1456
- if (m_request.get_header("User-Agent").empty()) {
1457
- if (!m_user_agent.empty()) {
1458
- m_request.replace_header("User-Agent",m_user_agent);
1459
- } else {
1460
- m_request.remove_header("User-Agent");
1461
- }
1462
- }
1463
-
1464
- m_handshake_buffer = m_request.raw();
1465
-
1466
- if (m_alog->static_test(log::alevel::devel)) {
1467
- m_alog->write(log::alevel::devel,"Raw Handshake request:\n"+m_handshake_buffer);
1468
- }
1469
-
1470
- if (m_open_handshake_timeout_dur > 0) {
1471
- m_handshake_timer = transport_con_type::set_timer(
1472
- m_open_handshake_timeout_dur,
1473
- lib::bind(
1474
- &type::handle_open_handshake_timeout,
1475
- type::get_shared(),
1476
- lib::placeholders::_1
1477
- )
1478
- );
1479
- }
1480
-
1481
- transport_con_type::async_write(
1482
- m_handshake_buffer.data(),
1483
- m_handshake_buffer.size(),
1484
- lib::bind(
1485
- &type::handle_send_http_request,
1486
- type::get_shared(),
1487
- lib::placeholders::_1
1488
- )
1489
- );
1490
- }
1491
-
1492
- template <typename config>
1493
- void connection<config>::handle_send_http_request(lib::error_code const & ec) {
1494
- m_alog->write(log::alevel::devel,"handle_send_http_request");
1495
-
1496
- lib::error_code ecm = ec;
1497
-
1498
- if (!ecm) {
1499
- scoped_lock_type lock(m_connection_state_lock);
1500
-
1501
- if (m_state == session::state::connecting) {
1502
- if (m_internal_state != istate::WRITE_HTTP_REQUEST) {
1503
- ecm = error::make_error_code(error::invalid_state);
1504
- } else {
1505
- m_internal_state = istate::READ_HTTP_RESPONSE;
1506
- }
1507
- } else if (m_state == session::state::closed) {
1508
- // The connection was canceled while the response was being sent,
1509
- // usually by the handshake timer. This is basically expected
1510
- // (though hopefully rare) and there is nothing we can do so ignore.
1511
- m_alog->write(log::alevel::devel,
1512
- "handle_send_http_request invoked after connection was closed");
1513
- return;
1514
- } else {
1515
- ecm = error::make_error_code(error::invalid_state);
1516
- }
1517
- }
1518
-
1519
- if (ecm) {
1520
- if (ecm == transport::error::eof && m_state == session::state::closed) {
1521
- // we expect to get eof if the connection is closed already
1522
- m_alog->write(log::alevel::devel,
1523
- "got (expected) eof/state error from closed con");
1524
- return;
1525
- }
1526
-
1527
- log_err(log::elevel::rerror,"handle_send_http_request",ecm);
1528
- this->terminate(ecm);
1529
- return;
1530
- }
1531
-
1532
- transport_con_type::async_read_at_least(
1533
- 1,
1534
- m_buf,
1535
- config::connection_read_buffer_size,
1536
- lib::bind(
1537
- &type::handle_read_http_response,
1538
- type::get_shared(),
1539
- lib::placeholders::_1,
1540
- lib::placeholders::_2
1541
- )
1542
- );
1543
- }
1544
-
1545
- template <typename config>
1546
- void connection<config>::handle_read_http_response(lib::error_code const & ec,
1547
- size_t bytes_transferred)
1548
- {
1549
- m_alog->write(log::alevel::devel,"handle_read_http_response");
1550
-
1551
- lib::error_code ecm = ec;
1552
-
1553
- if (!ecm) {
1554
- scoped_lock_type lock(m_connection_state_lock);
1555
-
1556
- if (m_state == session::state::connecting) {
1557
- if (m_internal_state != istate::READ_HTTP_RESPONSE) {
1558
- ecm = error::make_error_code(error::invalid_state);
1559
- }
1560
- } else if (m_state == session::state::closed) {
1561
- // The connection was canceled while the response was being sent,
1562
- // usually by the handshake timer. This is basically expected
1563
- // (though hopefully rare) and there is nothing we can do so ignore.
1564
- m_alog->write(log::alevel::devel,
1565
- "handle_read_http_response invoked after connection was closed");
1566
- return;
1567
- } else {
1568
- ecm = error::make_error_code(error::invalid_state);
1569
- }
1570
- }
1571
-
1572
- if (ecm) {
1573
- if (ecm == transport::error::eof && m_state == session::state::closed) {
1574
- // we expect to get eof if the connection is closed already
1575
- m_alog->write(log::alevel::devel,
1576
- "got (expected) eof/state error from closed con");
1577
- return;
1578
- }
1579
-
1580
- log_err(log::elevel::rerror,"handle_read_http_response",ecm);
1581
- this->terminate(ecm);
1582
- return;
1583
- }
1584
-
1585
- size_t bytes_processed = 0;
1586
- // TODO: refactor this to use error codes rather than exceptions
1587
- try {
1588
- bytes_processed = m_response.consume(m_buf,bytes_transferred);
1589
- } catch (http::exception & e) {
1590
- m_elog->write(log::elevel::rerror,
1591
- std::string("error in handle_read_http_response: ")+e.what());
1592
- this->terminate(make_error_code(error::general));
1593
- return;
1594
- }
1595
-
1596
- m_alog->write(log::alevel::devel,std::string("Raw response: ")+m_response.raw());
1597
-
1598
- if (m_response.headers_ready()) {
1599
- if (m_handshake_timer) {
1600
- m_handshake_timer->cancel();
1601
- m_handshake_timer.reset();
1602
- }
1603
-
1604
- lib::error_code validate_ec = m_processor->validate_server_handshake_response(
1605
- m_request,
1606
- m_response
1607
- );
1608
- if (validate_ec) {
1609
- log_err(log::elevel::rerror,"Server handshake response",validate_ec);
1610
- this->terminate(validate_ec);
1611
- return;
1612
- }
1613
-
1614
- // Read extension parameters and set up values necessary for the end
1615
- // user to complete extension negotiation.
1616
- std::pair<lib::error_code,std::string> neg_results;
1617
- neg_results = m_processor->negotiate_extensions(m_response);
1618
-
1619
- if (neg_results.first) {
1620
- // There was a fatal error in extension negotiation. For the moment
1621
- // kill all connections that fail extension negotiation.
1622
-
1623
- // TODO: deal with cases where the response is well formed but
1624
- // doesn't match the options requested by the client. Its possible
1625
- // that the best behavior in this cases is to log and continue with
1626
- // an unextended connection.
1627
- m_alog->write(log::alevel::devel, "Extension negotiation failed: "
1628
- + neg_results.first.message());
1629
- this->terminate(make_error_code(error::extension_neg_failed));
1630
- // TODO: close connection with reason 1010 (and list extensions)
1631
- }
1632
-
1633
- // response is valid, connection can now be assumed to be open
1634
- m_internal_state = istate::PROCESS_CONNECTION;
1635
- m_state = session::state::open;
1636
-
1637
- this->log_open_result();
1638
-
1639
- if (m_open_handler) {
1640
- m_open_handler(m_connection_hdl);
1641
- }
1642
-
1643
- // The remaining bytes in m_buf are frame data. Copy them to the
1644
- // beginning of the buffer and note the length. They will be read after
1645
- // the handshake completes and before more bytes are read.
1646
- std::copy(m_buf+bytes_processed,m_buf+bytes_transferred,m_buf);
1647
- m_buf_cursor = bytes_transferred-bytes_processed;
1648
-
1649
- this->handle_read_frame(lib::error_code(), m_buf_cursor);
1650
- } else {
1651
- transport_con_type::async_read_at_least(
1652
- 1,
1653
- m_buf,
1654
- config::connection_read_buffer_size,
1655
- lib::bind(
1656
- &type::handle_read_http_response,
1657
- type::get_shared(),
1658
- lib::placeholders::_1,
1659
- lib::placeholders::_2
1660
- )
1661
- );
1662
- }
1663
- }
1664
-
1665
- template <typename config>
1666
- void connection<config>::handle_open_handshake_timeout(
1667
- lib::error_code const & ec)
1668
- {
1669
- if (ec == transport::error::operation_aborted) {
1670
- m_alog->write(log::alevel::devel,"open handshake timer cancelled");
1671
- } else if (ec) {
1672
- m_alog->write(log::alevel::devel,
1673
- "open handle_open_handshake_timeout error: "+ec.message());
1674
- // TODO: ignore or fail here?
1675
- } else {
1676
- m_alog->write(log::alevel::devel,"open handshake timer expired");
1677
- terminate(make_error_code(error::open_handshake_timeout));
1678
- }
1679
- }
1680
-
1681
- template <typename config>
1682
- void connection<config>::handle_close_handshake_timeout(
1683
- lib::error_code const & ec)
1684
- {
1685
- if (ec == transport::error::operation_aborted) {
1686
- m_alog->write(log::alevel::devel,"asio close handshake timer cancelled");
1687
- } else if (ec) {
1688
- m_alog->write(log::alevel::devel,
1689
- "asio open handle_close_handshake_timeout error: "+ec.message());
1690
- // TODO: ignore or fail here?
1691
- } else {
1692
- m_alog->write(log::alevel::devel, "asio close handshake timer expired");
1693
- terminate(make_error_code(error::close_handshake_timeout));
1694
- }
1695
- }
1696
-
1697
- template <typename config>
1698
- void connection<config>::terminate(lib::error_code const & ec) {
1699
- if (m_alog->static_test(log::alevel::devel)) {
1700
- m_alog->write(log::alevel::devel,"connection terminate");
1701
- }
1702
-
1703
- // Cancel close handshake timer
1704
- if (m_handshake_timer) {
1705
- m_handshake_timer->cancel();
1706
- m_handshake_timer.reset();
1707
- }
1708
-
1709
- terminate_status tstat = unknown;
1710
- if (ec) {
1711
- m_ec = ec;
1712
- m_local_close_code = close::status::abnormal_close;
1713
- m_local_close_reason = ec.message();
1714
- }
1715
-
1716
- // TODO: does any of this need a mutex?
1717
- if (m_is_http) {
1718
- m_http_state = session::http_state::closed;
1719
- }
1720
- if (m_state == session::state::connecting) {
1721
- m_state = session::state::closed;
1722
- tstat = failed;
1723
-
1724
- // Log fail result here before socket is shut down and we can't get
1725
- // the remote address, etc anymore
1726
- if (m_ec != error::http_connection_ended) {
1727
- log_fail_result();
1728
- }
1729
- } else if (m_state != session::state::closed) {
1730
- m_state = session::state::closed;
1731
- tstat = closed;
1732
- } else {
1733
- m_alog->write(log::alevel::devel,
1734
- "terminate called on connection that was already terminated");
1735
- return;
1736
- }
1737
-
1738
- // TODO: choose between shutdown and close based on error code sent
1739
-
1740
- transport_con_type::async_shutdown(
1741
- lib::bind(
1742
- &type::handle_terminate,
1743
- type::get_shared(),
1744
- tstat,
1745
- lib::placeholders::_1
1746
- )
1747
- );
1748
- }
1749
-
1750
- template <typename config>
1751
- void connection<config>::handle_terminate(terminate_status tstat,
1752
- lib::error_code const & ec)
1753
- {
1754
- if (m_alog->static_test(log::alevel::devel)) {
1755
- m_alog->write(log::alevel::devel,"connection handle_terminate");
1756
- }
1757
-
1758
- if (ec) {
1759
- // there was an error actually shutting down the connection
1760
- log_err(log::elevel::devel,"handle_terminate",ec);
1761
- }
1762
-
1763
- // clean shutdown
1764
- if (tstat == failed) {
1765
- if (m_ec != error::http_connection_ended) {
1766
- if (m_fail_handler) {
1767
- m_fail_handler(m_connection_hdl);
1768
- }
1769
- }
1770
- } else if (tstat == closed) {
1771
- if (m_close_handler) {
1772
- m_close_handler(m_connection_hdl);
1773
- }
1774
- log_close_result();
1775
- } else {
1776
- m_elog->write(log::elevel::rerror,"Unknown terminate_status");
1777
- }
1778
-
1779
- // call the termination handler if it exists
1780
- // if it exists it might (but shouldn't) refer to a bad memory location.
1781
- // If it does, we don't care and should catch and ignore it.
1782
- if (m_termination_handler) {
1783
- try {
1784
- m_termination_handler(type::get_shared());
1785
- } catch (std::exception const & e) {
1786
- m_elog->write(log::elevel::warn,
1787
- std::string("termination_handler call failed. Reason was: ")+e.what());
1788
- }
1789
- }
1790
- }
1791
-
1792
- template <typename config>
1793
- void connection<config>::write_frame() {
1794
- //m_alog->write(log::alevel::devel,"connection write_frame");
1795
-
1796
- {
1797
- scoped_lock_type lock(m_write_lock);
1798
-
1799
- // Check the write flag. If true, there is an outstanding transport
1800
- // write already. In this case we just return. The write handler will
1801
- // start a new write if the write queue isn't empty. If false, we set
1802
- // the write flag and proceed to initiate a transport write.
1803
- if (m_write_flag) {
1804
- return;
1805
- }
1806
-
1807
- // pull off all the messages that are ready to write.
1808
- // stop if we get a message marked terminal
1809
- message_ptr next_message = write_pop();
1810
- while (next_message) {
1811
- m_current_msgs.push_back(next_message);
1812
- if (!next_message->get_terminal()) {
1813
- next_message = write_pop();
1814
- } else {
1815
- next_message = message_ptr();
1816
- }
1817
- }
1818
-
1819
- if (m_current_msgs.empty()) {
1820
- // there was nothing to send
1821
- return;
1822
- } else {
1823
- // At this point we own the next messages to be sent and are
1824
- // responsible for holding the write flag until they are
1825
- // successfully sent or there is some error
1826
- m_write_flag = true;
1827
- }
1828
- }
1829
-
1830
- typename std::vector<message_ptr>::iterator it;
1831
- for (it = m_current_msgs.begin(); it != m_current_msgs.end(); ++it) {
1832
- std::string const & header = (*it)->get_header();
1833
- std::string const & payload = (*it)->get_payload();
1834
-
1835
- m_send_buffer.push_back(transport::buffer(header.c_str(),header.size()));
1836
- m_send_buffer.push_back(transport::buffer(payload.c_str(),payload.size()));
1837
- }
1838
-
1839
- // Print detailed send stats if those log levels are enabled
1840
- if (m_alog->static_test(log::alevel::frame_header)) {
1841
- if (m_alog->dynamic_test(log::alevel::frame_header)) {
1842
- std::stringstream general,header,payload;
1843
-
1844
- general << "Dispatching write containing " << m_current_msgs.size()
1845
- <<" message(s) containing ";
1846
- header << "Header Bytes: \n";
1847
- payload << "Payload Bytes: \n";
1848
-
1849
- size_t hbytes = 0;
1850
- size_t pbytes = 0;
1851
-
1852
- for (size_t i = 0; i < m_current_msgs.size(); i++) {
1853
- hbytes += m_current_msgs[i]->get_header().size();
1854
- pbytes += m_current_msgs[i]->get_payload().size();
1855
-
1856
-
1857
- header << "[" << i << "] ("
1858
- << m_current_msgs[i]->get_header().size() << ") "
1859
- << utility::to_hex(m_current_msgs[i]->get_header()) << "\n";
1860
-
1861
- if (m_alog->static_test(log::alevel::frame_payload)) {
1862
- if (m_alog->dynamic_test(log::alevel::frame_payload)) {
1863
- payload << "[" << i << "] ("
1864
- << m_current_msgs[i]->get_payload().size() << ") ["<<m_current_msgs[i]->get_opcode()<<"] "
1865
- << (m_current_msgs[i]->get_opcode() == frame::opcode::text ?
1866
- m_current_msgs[i]->get_payload() :
1867
- utility::to_hex(m_current_msgs[i]->get_payload())
1868
- )
1869
- << "\n";
1870
- }
1871
- }
1872
- }
1873
-
1874
- general << hbytes << " header bytes and " << pbytes << " payload bytes";
1875
-
1876
- m_alog->write(log::alevel::frame_header,general.str());
1877
- m_alog->write(log::alevel::frame_header,header.str());
1878
- m_alog->write(log::alevel::frame_payload,payload.str());
1879
- }
1880
- }
1881
-
1882
- transport_con_type::async_write(
1883
- m_send_buffer,
1884
- m_write_frame_handler
1885
- );
1886
- }
1887
-
1888
- template <typename config>
1889
- void connection<config>::handle_write_frame(lib::error_code const & ec)
1890
- {
1891
- if (m_alog->static_test(log::alevel::devel)) {
1892
- m_alog->write(log::alevel::devel,"connection handle_write_frame");
1893
- }
1894
-
1895
- bool terminal = m_current_msgs.back()->get_terminal();
1896
-
1897
- m_send_buffer.clear();
1898
- m_current_msgs.clear();
1899
- // TODO: recycle instead of deleting
1900
-
1901
- if (ec) {
1902
- log_err(log::elevel::fatal,"handle_write_frame",ec);
1903
- this->terminate(ec);
1904
- return;
1905
- }
1906
-
1907
- if (terminal) {
1908
- this->terminate(lib::error_code());
1909
- return;
1910
- }
1911
-
1912
- bool needs_writing = false;
1913
- {
1914
- scoped_lock_type lock(m_write_lock);
1915
-
1916
- // release write flag
1917
- m_write_flag = false;
1918
-
1919
- needs_writing = !m_send_queue.empty();
1920
- }
1921
-
1922
- if (needs_writing) {
1923
- transport_con_type::dispatch(lib::bind(
1924
- &type::write_frame,
1925
- type::get_shared()
1926
- ));
1927
- }
1928
- }
1929
-
1930
- template <typename config>
1931
- std::vector<int> const & connection<config>::get_supported_versions() const
1932
- {
1933
- return versions_supported;
1934
- }
1935
-
1936
- template <typename config>
1937
- void connection<config>::process_control_frame(typename config::message_type::ptr msg)
1938
- {
1939
- m_alog->write(log::alevel::devel,"process_control_frame");
1940
-
1941
- frame::opcode::value op = msg->get_opcode();
1942
- lib::error_code ec;
1943
-
1944
- std::stringstream s;
1945
- s << "Control frame received with opcode " << op;
1946
- m_alog->write(log::alevel::control,s.str());
1947
-
1948
- if (m_state == session::state::closed) {
1949
- m_elog->write(log::elevel::warn,"got frame in state closed");
1950
- return;
1951
- }
1952
- if (op != frame::opcode::CLOSE && m_state != session::state::open) {
1953
- m_elog->write(log::elevel::warn,"got non-close frame in state closing");
1954
- return;
1955
- }
1956
-
1957
- if (op == frame::opcode::PING) {
1958
- bool should_reply = true;
1959
-
1960
- if (m_ping_handler) {
1961
- should_reply = m_ping_handler(m_connection_hdl, msg->get_payload());
1962
- }
1963
-
1964
- if (should_reply) {
1965
- this->pong(msg->get_payload(),ec);
1966
- if (ec) {
1967
- log_err(log::elevel::devel,"Failed to send response pong",ec);
1968
- }
1969
- }
1970
- } else if (op == frame::opcode::PONG) {
1971
- if (m_pong_handler) {
1972
- m_pong_handler(m_connection_hdl, msg->get_payload());
1973
- }
1974
- if (m_ping_timer) {
1975
- m_ping_timer->cancel();
1976
- }
1977
- } else if (op == frame::opcode::CLOSE) {
1978
- m_alog->write(log::alevel::devel,"got close frame");
1979
- // record close code and reason somewhere
1980
-
1981
- m_remote_close_code = close::extract_code(msg->get_payload(),ec);
1982
- if (ec) {
1983
- s.str("");
1984
- if (config::drop_on_protocol_error) {
1985
- s << "Received invalid close code " << m_remote_close_code
1986
- << " dropping connection per config.";
1987
- m_elog->write(log::elevel::devel,s.str());
1988
- this->terminate(ec);
1989
- } else {
1990
- s << "Received invalid close code " << m_remote_close_code
1991
- << " sending acknowledgement and closing";
1992
- m_elog->write(log::elevel::devel,s.str());
1993
- ec = send_close_ack(close::status::protocol_error,
1994
- "Invalid close code");
1995
- if (ec) {
1996
- log_err(log::elevel::devel,"send_close_ack",ec);
1997
- }
1998
- }
1999
- return;
2000
- }
2001
-
2002
- m_remote_close_reason = close::extract_reason(msg->get_payload(),ec);
2003
- if (ec) {
2004
- if (config::drop_on_protocol_error) {
2005
- m_elog->write(log::elevel::devel,
2006
- "Received invalid close reason. Dropping connection per config");
2007
- this->terminate(ec);
2008
- } else {
2009
- m_elog->write(log::elevel::devel,
2010
- "Received invalid close reason. Sending acknowledgement and closing");
2011
- ec = send_close_ack(close::status::protocol_error,
2012
- "Invalid close reason");
2013
- if (ec) {
2014
- log_err(log::elevel::devel,"send_close_ack",ec);
2015
- }
2016
- }
2017
- return;
2018
- }
2019
-
2020
- if (m_state == session::state::open) {
2021
- s.str("");
2022
- s << "Received close frame with code " << m_remote_close_code
2023
- << " and reason " << m_remote_close_reason;
2024
- m_alog->write(log::alevel::devel,s.str());
2025
-
2026
- ec = send_close_ack();
2027
- if (ec) {
2028
- log_err(log::elevel::devel,"send_close_ack",ec);
2029
- }
2030
- } else if (m_state == session::state::closing && !m_was_clean) {
2031
- // ack of our close
2032
- m_alog->write(log::alevel::devel, "Got acknowledgement of close");
2033
-
2034
- m_was_clean = true;
2035
-
2036
- // If we are a server terminate the connection now. Clients should
2037
- // leave the connection open to give the server an opportunity to
2038
- // initiate the TCP close. The client's timer will handle closing
2039
- // its side of the connection if the server misbehaves.
2040
- //
2041
- // TODO: different behavior if the underlying transport doesn't
2042
- // support timers?
2043
- if (m_is_server) {
2044
- terminate(lib::error_code());
2045
- }
2046
- } else {
2047
- // spurious, ignore
2048
- m_elog->write(log::elevel::devel, "Got close frame in wrong state");
2049
- }
2050
- } else {
2051
- // got an invalid control opcode
2052
- m_elog->write(log::elevel::devel, "Got control frame with invalid opcode");
2053
- // initiate protocol error shutdown
2054
- }
2055
- }
2056
-
2057
- template <typename config>
2058
- lib::error_code connection<config>::send_close_ack(close::status::value code,
2059
- std::string const & reason)
2060
- {
2061
- return send_close_frame(code,reason,true,m_is_server);
2062
- }
2063
-
2064
- template <typename config>
2065
- lib::error_code connection<config>::send_close_frame(close::status::value code,
2066
- std::string const & reason, bool ack, bool terminal)
2067
- {
2068
- m_alog->write(log::alevel::devel,"send_close_frame");
2069
-
2070
- // check for special codes
2071
-
2072
- // If silent close is set, respect it and blank out close information
2073
- // Otherwise use whatever has been specified in the parameters. If
2074
- // parameters specifies close::status::blank then determine what to do
2075
- // based on whether or not this is an ack. If it is not an ack just
2076
- // send blank info. If it is an ack then echo the close information from
2077
- // the remote endpoint.
2078
- if (config::silent_close) {
2079
- m_alog->write(log::alevel::devel,"closing silently");
2080
- m_local_close_code = close::status::no_status;
2081
- m_local_close_reason.clear();
2082
- } else if (code != close::status::blank) {
2083
- m_alog->write(log::alevel::devel,"closing with specified codes");
2084
- m_local_close_code = code;
2085
- m_local_close_reason = reason;
2086
- } else if (!ack) {
2087
- m_alog->write(log::alevel::devel,"closing with no status code");
2088
- m_local_close_code = close::status::no_status;
2089
- m_local_close_reason.clear();
2090
- } else if (m_remote_close_code == close::status::no_status) {
2091
- m_alog->write(log::alevel::devel,
2092
- "acknowledging a no-status close with normal code");
2093
- m_local_close_code = close::status::normal;
2094
- m_local_close_reason.clear();
2095
- } else {
2096
- m_alog->write(log::alevel::devel,"acknowledging with remote codes");
2097
- m_local_close_code = m_remote_close_code;
2098
- m_local_close_reason = m_remote_close_reason;
2099
- }
2100
-
2101
- std::stringstream s;
2102
- s << "Closing with code: " << m_local_close_code << ", and reason: "
2103
- << m_local_close_reason;
2104
- m_alog->write(log::alevel::devel,s.str());
2105
-
2106
- message_ptr msg = m_msg_manager->get_message();
2107
- if (!msg) {
2108
- return error::make_error_code(error::no_outgoing_buffers);
2109
- }
2110
-
2111
- lib::error_code ec = m_processor->prepare_close(m_local_close_code,
2112
- m_local_close_reason,msg);
2113
- if (ec) {
2114
- return ec;
2115
- }
2116
-
2117
- // Messages flagged terminal will result in the TCP connection being dropped
2118
- // after the message has been written. This is typically used when servers
2119
- // send an ack and when any endpoint encounters a protocol error
2120
- if (terminal) {
2121
- msg->set_terminal(true);
2122
- }
2123
-
2124
- m_state = session::state::closing;
2125
-
2126
- if (ack) {
2127
- m_was_clean = true;
2128
- }
2129
-
2130
- // Start a timer so we don't wait forever for the acknowledgement close
2131
- // frame
2132
- if (m_close_handshake_timeout_dur > 0) {
2133
- m_handshake_timer = transport_con_type::set_timer(
2134
- m_close_handshake_timeout_dur,
2135
- lib::bind(
2136
- &type::handle_close_handshake_timeout,
2137
- type::get_shared(),
2138
- lib::placeholders::_1
2139
- )
2140
- );
2141
- }
2142
-
2143
- bool needs_writing = false;
2144
- {
2145
- scoped_lock_type lock(m_write_lock);
2146
- write_push(msg);
2147
- needs_writing = !m_write_flag && !m_send_queue.empty();
2148
- }
2149
-
2150
- if (needs_writing) {
2151
- transport_con_type::dispatch(lib::bind(
2152
- &type::write_frame,
2153
- type::get_shared()
2154
- ));
2155
- }
2156
-
2157
- return lib::error_code();
2158
- }
2159
-
2160
- template <typename config>
2161
- typename connection<config>::processor_ptr
2162
- connection<config>::get_processor(int version) const {
2163
- // TODO: allow disabling certain versions
2164
-
2165
- processor_ptr p;
2166
-
2167
- switch (version) {
2168
- case 0:
2169
- p = lib::make_shared<processor::hybi00<config> >(
2170
- transport_con_type::is_secure(),
2171
- m_is_server,
2172
- m_msg_manager
2173
- );
2174
- break;
2175
- case 7:
2176
- p = lib::make_shared<processor::hybi07<config> >(
2177
- transport_con_type::is_secure(),
2178
- m_is_server,
2179
- m_msg_manager,
2180
- lib::ref(m_rng)
2181
- );
2182
- break;
2183
- case 8:
2184
- p = lib::make_shared<processor::hybi08<config> >(
2185
- transport_con_type::is_secure(),
2186
- m_is_server,
2187
- m_msg_manager,
2188
- lib::ref(m_rng)
2189
- );
2190
- break;
2191
- case 13:
2192
- p = lib::make_shared<processor::hybi13<config> >(
2193
- transport_con_type::is_secure(),
2194
- m_is_server,
2195
- m_msg_manager,
2196
- lib::ref(m_rng)
2197
- );
2198
- break;
2199
- default:
2200
- return p;
2201
- }
2202
-
2203
- // Settings not configured by the constructor
2204
- p->set_max_message_size(m_max_message_size);
2205
-
2206
- return p;
2207
- }
2208
-
2209
- template <typename config>
2210
- void connection<config>::write_push(typename config::message_type::ptr msg)
2211
- {
2212
- if (!msg) {
2213
- return;
2214
- }
2215
-
2216
- m_send_buffer_size += msg->get_payload().size();
2217
- m_send_queue.push(msg);
2218
-
2219
- if (m_alog->static_test(log::alevel::devel)) {
2220
- std::stringstream s;
2221
- s << "write_push: message count: " << m_send_queue.size()
2222
- << " buffer size: " << m_send_buffer_size;
2223
- m_alog->write(log::alevel::devel,s.str());
2224
- }
2225
- }
2226
-
2227
- template <typename config>
2228
- typename config::message_type::ptr connection<config>::write_pop()
2229
- {
2230
- message_ptr msg;
2231
-
2232
- if (m_send_queue.empty()) {
2233
- return msg;
2234
- }
2235
-
2236
- msg = m_send_queue.front();
2237
-
2238
- m_send_buffer_size -= msg->get_payload().size();
2239
- m_send_queue.pop();
2240
-
2241
- if (m_alog->static_test(log::alevel::devel)) {
2242
- std::stringstream s;
2243
- s << "write_pop: message count: " << m_send_queue.size()
2244
- << " buffer size: " << m_send_buffer_size;
2245
- m_alog->write(log::alevel::devel,s.str());
2246
- }
2247
- return msg;
2248
- }
2249
-
2250
- template <typename config>
2251
- void connection<config>::log_open_result()
2252
- {
2253
- std::stringstream s;
2254
-
2255
- int version;
2256
- if (!processor::is_websocket_handshake(m_request)) {
2257
- version = -1;
2258
- } else {
2259
- version = processor::get_websocket_version(m_request);
2260
- }
2261
-
2262
- // Connection Type
2263
- s << (version == -1 ? "HTTP" : "WebSocket") << " Connection ";
2264
-
2265
- // Remote endpoint address
2266
- s << transport_con_type::get_remote_endpoint() << " ";
2267
-
2268
- // Version string if WebSocket
2269
- if (version != -1) {
2270
- s << "v" << version << " ";
2271
- }
2272
-
2273
- // User Agent
2274
- std::string ua = m_request.get_header("User-Agent");
2275
- if (ua.empty()) {
2276
- s << "\"\" ";
2277
- } else {
2278
- // check if there are any quotes in the user agent
2279
- s << "\"" << utility::string_replace_all(ua,"\"","\\\"") << "\" ";
2280
- }
2281
-
2282
- // URI
2283
- s << (m_uri ? m_uri->get_resource() : "NULL") << " ";
2284
-
2285
- // Status code
2286
- s << m_response.get_status_code();
2287
-
2288
- m_alog->write(log::alevel::connect,s.str());
2289
- }
2290
-
2291
- template <typename config>
2292
- void connection<config>::log_close_result()
2293
- {
2294
- std::stringstream s;
2295
-
2296
- s << "Disconnect "
2297
- << "close local:[" << m_local_close_code
2298
- << (m_local_close_reason.empty() ? "" : ","+m_local_close_reason)
2299
- << "] remote:[" << m_remote_close_code
2300
- << (m_remote_close_reason.empty() ? "" : ","+m_remote_close_reason) << "]";
2301
-
2302
- m_alog->write(log::alevel::disconnect,s.str());
2303
- }
2304
-
2305
- template <typename config>
2306
- void connection<config>::log_fail_result()
2307
- {
2308
- std::stringstream s;
2309
-
2310
- int version = processor::get_websocket_version(m_request);
2311
-
2312
- // Connection Type
2313
- s << "WebSocket Connection ";
2314
-
2315
- // Remote endpoint address & WebSocket version
2316
- s << transport_con_type::get_remote_endpoint();
2317
- if (version < 0) {
2318
- s << " -";
2319
- } else {
2320
- s << " v" << version;
2321
- }
2322
-
2323
- // User Agent
2324
- std::string ua = m_request.get_header("User-Agent");
2325
- if (ua.empty()) {
2326
- s << " \"\" ";
2327
- } else {
2328
- // check if there are any quotes in the user agent
2329
- s << " \"" << utility::string_replace_all(ua,"\"","\\\"") << "\" ";
2330
- }
2331
-
2332
- // URI
2333
- s << (m_uri ? m_uri->get_resource() : "-");
2334
-
2335
- // HTTP Status code
2336
- s << " " << m_response.get_status_code();
2337
-
2338
- // WebSocket++ error code & reason
2339
- s << " " << m_ec << " " << m_ec.message();
2340
-
2341
- m_alog->write(log::alevel::fail,s.str());
2342
- }
2343
-
2344
- template <typename config>
2345
- void connection<config>::log_http_result() {
2346
- std::stringstream s;
2347
-
2348
- if (processor::is_websocket_handshake(m_request)) {
2349
- m_alog->write(log::alevel::devel,"Call to log_http_result for WebSocket");
2350
- return;
2351
- }
2352
-
2353
- // Connection Type
2354
- s << (m_request.get_header("host").empty() ? "-" : m_request.get_header("host"))
2355
- << " " << transport_con_type::get_remote_endpoint()
2356
- << " \"" << m_request.get_method()
2357
- << " " << (m_uri ? m_uri->get_resource() : "-")
2358
- << " " << m_request.get_version() << "\" " << m_response.get_status_code()
2359
- << " " << m_response.get_body().size();
2360
-
2361
- // User Agent
2362
- std::string ua = m_request.get_header("User-Agent");
2363
- if (ua.empty()) {
2364
- s << " \"\" ";
2365
- } else {
2366
- // check if there are any quotes in the user agent
2367
- s << " \"" << utility::string_replace_all(ua,"\"","\\\"") << "\" ";
2368
- }
2369
-
2370
- m_alog->write(log::alevel::http,s.str());
2371
- }
2372
-
2373
- } // namespace websocketpp
2374
-
2375
- #endif // WEBSOCKETPP_CONNECTION_IMPL_HPP