passenger 5.1.12 → 5.2.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG +18 -1
- data/Rakefile +4 -1
- data/build/agent.rb +2 -2
- data/build/apache2.rb +17 -10
- data/build/basics.rb +18 -4
- data/build/common_library.rb +7 -3
- data/build/cxx_tests.rb +2 -7
- data/build/misc.rb +3 -1
- data/build/nginx.rb +11 -5
- data/build/oxt_tests.rb +0 -3
- data/build/packaging.rb +3 -2
- data/build/schema_printer.rb +103 -0
- data/build/support/cplusplus.rb +2 -2
- data/build/support/cxx_dependency_map.rb +2575 -868
- data/dev/ci/lib/functions.sh +1 -1
- data/dev/ci/lib/set-container-envvars.sh +1 -1
- data/dev/ci/lib/setup-container.sh +1 -1
- data/dev/ci/run-tests-natively +1 -1
- data/dev/ci/run-tests-with-docker +1 -1
- data/dev/ci/scripts/debug-console-wrapper.sh +1 -1
- data/dev/ci/scripts/docker-entrypoint-stage2.sh +1 -1
- data/dev/ci/scripts/docker-entrypoint.sh +1 -1
- data/dev/ci/scripts/inituidgid +1 -1
- data/dev/ci/scripts/run-tests-natively-stage2.sh +1 -1
- data/dev/ci/scripts/setup-host-natively.sh +1 -1
- data/dev/ci/setup-host +1 -1
- data/dev/ci/tests/apache2/run +1 -1
- data/dev/ci/tests/apache2/setup +1 -1
- data/dev/ci/tests/cxx/run +1 -1
- data/dev/ci/tests/cxx/setup +1 -1
- data/dev/ci/tests/debian/Jenkinsfile +0 -1
- data/dev/ci/tests/debian/run +1 -1
- data/dev/ci/tests/nginx-dynamic/run +1 -1
- data/dev/ci/tests/nginx-dynamic/setup +1 -1
- data/dev/ci/tests/nginx/run +1 -1
- data/dev/ci/tests/nginx/setup +1 -1
- data/dev/ci/tests/nodejs/run +1 -1
- data/dev/ci/tests/nodejs/setup +1 -1
- data/dev/ci/tests/rpm/run +1 -1
- data/dev/ci/tests/ruby/run +1 -1
- data/dev/ci/tests/ruby/setup +1 -1
- data/dev/ci/tests/source-packaging/run +1 -1
- data/dev/ci/tests/source-packaging/setup +1 -1
- data/dev/ci/tests/standalone/run +1 -1
- data/dev/ci/tests/standalone/setup +1 -1
- data/dev/configkit-schemas/index.json +1708 -0
- data/dev/configkit-schemas/update_schema_inline_comments.rb +118 -0
- data/dev/copy_boost_headers +13 -1
- data/dev/index_cxx_dependencies.rb +20 -7
- data/dev/vagrant/provision.sh +1 -1
- data/resources/mime.types +1 -0
- data/resources/templates/standalone/http.erb +1 -6
- data/src/agent/Core/AdminPanelConnector.h +550 -0
- data/src/agent/Core/ApiServer.h +159 -97
- data/src/agent/Core/ApplicationPool/Group.h +2 -0
- data/src/agent/Core/ApplicationPool/Group/InternalUtils.cpp +3 -2
- data/src/agent/Core/ApplicationPool/Group/StateInspection.cpp +109 -0
- data/src/agent/Core/ApplicationPool/Implementation.cpp +5 -3
- data/src/agent/Core/ApplicationPool/Options.h +5 -6
- data/src/agent/Core/ApplicationPool/Pool.h +59 -2
- data/src/agent/Core/ApplicationPool/Pool/GeneralUtils.cpp +3 -3
- data/src/agent/Core/ApplicationPool/Pool/InitializationAndShutdown.cpp +2 -2
- data/src/agent/Core/ApplicationPool/Pool/Miscellaneous.cpp +6 -0
- data/src/agent/Core/ApplicationPool/Pool/StateInspection.cpp +129 -0
- data/src/agent/Core/Config.h +475 -0
- data/src/agent/Core/ConfigChange.cpp +349 -0
- data/src/agent/Core/ConfigChange.h +54 -0
- data/src/agent/Core/Controller.h +35 -3
- data/src/agent/Core/Controller/CheckoutSession.cpp +1 -1
- data/src/agent/Core/Controller/Config.cpp +0 -2
- data/src/agent/Core/Controller/Config.h +168 -104
- data/src/agent/Core/Controller/ForwardResponse.cpp +1 -1
- data/src/agent/Core/Controller/InitRequest.cpp +14 -15
- data/src/agent/Core/Controller/InitializationAndShutdown.cpp +34 -44
- data/src/agent/Core/Controller/Request.h +0 -1
- data/src/agent/Core/CoreMain.cpp +236 -349
- data/src/agent/Core/OptionParser.h +75 -89
- data/src/agent/Core/SecurityUpdateChecker.h +263 -100
- data/src/agent/Core/SpawningKit/Config.h +6 -2
- data/src/agent/Core/SpawningKit/Spawner.h +0 -45
- data/src/agent/Core/SpawningKit/UserSwitchingRules.h +1 -0
- data/src/agent/Shared/ApiAccountUtils.h +318 -0
- data/src/agent/Shared/ApiServerUtils.h +3 -104
- data/src/agent/Shared/Fundamentals/Initialization.cpp +81 -44
- data/src/agent/Shared/Fundamentals/Initialization.h +12 -7
- data/src/agent/TempDirToucher/TempDirToucherMain.cpp +21 -0
- data/src/agent/Watchdog/AgentWatcher.cpp +1 -1
- data/src/agent/Watchdog/ApiServer.h +100 -14
- data/src/agent/Watchdog/Config.h +340 -0
- data/src/agent/Watchdog/CoreWatcher.cpp +27 -13
- data/src/agent/Watchdog/InstanceDirToucher.cpp +1 -1
- data/src/agent/Watchdog/WatchdogMain.cpp +190 -206
- data/src/apache2_module/Bucket.cpp +4 -0
- data/src/apache2_module/Bucket.h +7 -3
- data/src/apache2_module/CBindings.cpp +49 -0
- data/src/apache2_module/Config.cpp +242 -0
- data/src/apache2_module/Config.h +109 -0
- data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +485 -0
- data/src/apache2_module/{ConfigurationCommands.cpp.cxxcodebuilder → ConfigGeneral/AutoGeneratedDefinitions.cpp.cxxcodebuilder} +29 -15
- data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp +298 -0
- data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp.cxxcodebuilder +171 -0
- data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +854 -0
- data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp.cxxcodebuilder +188 -0
- data/src/apache2_module/ConfigGeneral/ManifestGeneration.h +610 -0
- data/src/apache2_module/ConfigGeneral/SetterFuncs.h +65 -0
- data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +174 -0
- data/src/apache2_module/{MergeDirConfig.cpp.cxxcodebuilder → DirConfig/AutoGeneratedCreateFunction.cpp.cxxcodebuilder} +54 -32
- data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp +113 -0
- data/src/apache2_module/{SetHeaders.cpp.cxxcodebuilder → DirConfig/AutoGeneratedHeaderSerialization.cpp.cxxcodebuilder} +34 -23
- data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +426 -0
- data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp.cxxcodebuilder +165 -0
- data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +269 -0
- data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp.cxxcodebuilder +148 -0
- data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +534 -0
- data/src/apache2_module/DirConfig/AutoGeneratedStruct.h.cxxcodebuilder +230 -0
- data/src/apache2_module/DirectoryMapper.h +19 -16
- data/src/apache2_module/Hooks.cpp +124 -138
- data/src/apache2_module/Hooks.h +9 -14
- data/src/apache2_module/ServerConfig/AutoGeneratedManifestGeneration.cpp +263 -0
- data/src/apache2_module/ServerConfig/AutoGeneratedManifestGeneration.cpp.cxxcodebuilder +152 -0
- data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h +299 -0
- data/src/apache2_module/{ConfigurationFields.hpp.cxxcodebuilder → ServerConfig/AutoGeneratedStruct.h.cxxcodebuilder} +105 -18
- data/src/apache2_module/Utils.h +215 -0
- data/src/apache2_module/mod_passenger.c +16 -8
- data/src/cxx_supportlib/AppTypes.h +2 -0
- data/src/cxx_supportlib/ConfigKit/ConfigKit.h +1 -1
- data/src/cxx_supportlib/ConfigKit/DummyTranslator.h +8 -8
- data/src/cxx_supportlib/ConfigKit/IN_PRACTICE.md +7 -41
- data/src/cxx_supportlib/ConfigKit/PrefixTranslator.h +12 -66
- data/src/cxx_supportlib/ConfigKit/Schema.h +62 -11
- data/src/cxx_supportlib/ConfigKit/{ValidationUtils.h → SchemaUtils.h} +12 -3
- data/src/cxx_supportlib/ConfigKit/Store.h +17 -9
- data/src/cxx_supportlib/ConfigKit/SubComponentUtils.h +2 -1
- data/src/cxx_supportlib/ConfigKit/TableTranslator.h +13 -70
- data/src/cxx_supportlib/ConfigKit/Translator.h +125 -0
- data/src/cxx_supportlib/Constants.h +1 -3
- data/src/cxx_supportlib/FileTools/FileManip.cpp +297 -0
- data/src/cxx_supportlib/FileTools/FileManip.h +162 -0
- data/src/cxx_supportlib/{Utils → FileTools}/LargeFiles.cpp +6 -3
- data/src/cxx_supportlib/{Utils → FileTools}/LargeFiles.h +7 -5
- data/src/cxx_supportlib/FileTools/PathManip.cpp +240 -0
- data/src/cxx_supportlib/FileTools/PathManip.h +91 -0
- data/src/cxx_supportlib/FileTools/PathManipCBindings.cpp +62 -0
- data/src/{apache2_module/Configuration.h → cxx_supportlib/FileTools/PathManipCBindings.h} +12 -19
- data/src/cxx_supportlib/Hooks.h +19 -16
- data/src/cxx_supportlib/InstanceDirectory.h +11 -0
- data/src/cxx_supportlib/JsonTools/Autocast.h +79 -0
- data/src/cxx_supportlib/JsonTools/CBindings.cpp +364 -0
- data/src/cxx_supportlib/JsonTools/CBindings.h +101 -0
- data/src/cxx_supportlib/LoggingKit/Config.h +13 -0
- data/src/cxx_supportlib/LoggingKit/Context.h +5 -2
- data/src/cxx_supportlib/LoggingKit/Forward.h +0 -1
- data/src/cxx_supportlib/LoggingKit/Implementation.cpp +12 -4
- data/src/cxx_supportlib/ResourceLocator.h +15 -0
- data/src/cxx_supportlib/ServerKit/Config.h +156 -0
- data/src/cxx_supportlib/ServerKit/Context.h +59 -38
- data/src/cxx_supportlib/ServerKit/FileBufferedChannel.h +3 -2
- data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +2 -2
- data/src/cxx_supportlib/ServerKit/HttpServer.h +16 -2
- data/src/cxx_supportlib/ServerKit/Server.h +32 -15
- data/src/cxx_supportlib/Utils.cpp +0 -441
- data/src/cxx_supportlib/Utils.h +0 -158
- data/src/cxx_supportlib/Utils/Curl.h +1 -0
- data/src/cxx_supportlib/Utils/ProcessMetricsCollector.h +1 -0
- data/src/cxx_supportlib/Utils/StrIntUtilsNoStrictAliasing.cpp +2 -0
- data/src/cxx_supportlib/Utils/VariantMap.h +31 -0
- data/src/cxx_supportlib/WatchdogLauncher.cpp +7 -79
- data/src/cxx_supportlib/WatchdogLauncher.h +50 -53
- data/src/cxx_supportlib/WebSocketCommandReverseServer.h +981 -0
- data/src/cxx_supportlib/oxt/macros.hpp +9 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/COPYING +145 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/changelog.md +342 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/readme.md +49 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/base64/base64.hpp +178 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/client.hpp +33 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/close.hpp +342 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/asio.hpp +131 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/asio_ssl.hpp +39 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/chrono.hpp +68 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/connection_hdl.hpp +52 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/cpp11.hpp +162 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/functional.hpp +105 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/md5.hpp +448 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/memory.hpp +89 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/network.hpp +106 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/platforms.hpp +46 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/random.hpp +82 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/regex.hpp +59 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/stdint.hpp +73 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/system_error.hpp +84 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/thread.hpp +84 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/time.hpp +56 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/type_traits.hpp +65 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/concurrency/basic.hpp +46 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/concurrency/none.hpp +80 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/asio.hpp +77 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/asio_client.hpp +77 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/asio_no_tls.hpp +73 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/asio_no_tls_client.hpp +73 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/boost_config.hpp +72 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/core.hpp +285 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/core_client.hpp +294 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/debug.hpp +286 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/debug_asio.hpp +77 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/debug_asio_no_tls.hpp +73 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/minimal_client.hpp +72 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/minimal_server.hpp +312 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/connection.hpp +1651 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/connection_base.hpp +38 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/endpoint.hpp +700 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/endpoint_base.hpp +38 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/error.hpp +277 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/extensions/extension.hpp +102 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/extensions/permessage_deflate/disabled.hpp +128 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/extensions/permessage_deflate/enabled.hpp +752 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/frame.hpp +861 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/constants.hpp +308 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/impl/parser.hpp +196 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/impl/request.hpp +191 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/impl/response.hpp +266 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/parser.hpp +619 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/request.hpp +124 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/http/response.hpp +188 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/impl/connection_impl.hpp +2372 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/impl/endpoint_impl.hpp +269 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/impl/utilities_impl.hpp +87 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/logger/basic.hpp +199 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/logger/levels.hpp +203 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/logger/stub.hpp +119 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/logger/syslog.hpp +146 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/message_buffer/alloc.hpp +105 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/message_buffer/message.hpp +340 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/message_buffer/pool.hpp +229 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/processors/base.hpp +299 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/processors/hybi00.hpp +462 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/processors/hybi07.hpp +78 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/processors/hybi08.hpp +83 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/processors/hybi13.hpp +1056 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/processors/processor.hpp +407 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/random/none.hpp +60 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/random/random_device.hpp +80 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/roles/client_endpoint.hpp +173 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/roles/server_endpoint.hpp +190 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/server.hpp +33 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/sha1/sha1.hpp +189 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/base.hpp +232 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/connection.hpp +1204 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/endpoint.hpp +1147 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/security/base.hpp +159 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/security/none.hpp +370 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/security/tls.hpp +484 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/base/connection.hpp +238 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/base/endpoint.hpp +77 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/debug/base.hpp +104 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/debug/connection.hpp +412 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/debug/endpoint.hpp +140 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/iostream/base.hpp +133 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/iostream/connection.hpp +714 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/iostream/endpoint.hpp +222 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/stub/base.hpp +95 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/stub/connection.hpp +286 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/stub/endpoint.hpp +140 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/uri.hpp +355 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/utf8_validator.hpp +154 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/utilities.hpp +182 -0
- data/src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/version.hpp +61 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio.hpp +121 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/async_result.hpp +96 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_datagram_socket.hpp +951 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_deadline_timer.hpp +520 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_io_object.hpp +258 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_raw_socket.hpp +942 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_seq_packet_socket.hpp +567 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_serial_port.hpp +697 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_signal_set.hpp +386 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket.hpp +1519 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_acceptor.hpp +1137 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_iostream.hpp +288 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_streambuf.hpp +569 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_socket.hpp +854 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_streambuf.hpp +371 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_streambuf_fwd.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_waitable_timer.hpp +521 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffer.hpp +2241 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_read_stream.hpp +246 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_read_stream_fwd.hpp +27 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_stream.hpp +260 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_stream_fwd.hpp +27 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_write_stream.hpp +238 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_write_stream_fwd.hpp +27 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffers_iterator.hpp +483 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/completion_condition.hpp +220 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/connect.hpp +825 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/coroutine.hpp +330 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/datagram_socket_service.hpp +438 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/deadline_timer.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/deadline_timer_service.hpp +173 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/addressof.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/array.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/array_fwd.hpp +34 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/assert.hpp +32 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/atomic_count.hpp +47 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/base_from_completion_cond.hpp +70 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/bind_handler.hpp +491 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffer_resize_guard.hpp +68 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffer_sequence_adapter.hpp +385 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffered_stream_storage.hpp +128 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/call_stack.hpp +127 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/chrono_time_traits.hpp +192 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/completion_handler.hpp +83 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/config.hpp +1050 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/consuming_buffers.hpp +294 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/cstdint.hpp +48 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/date_time_fwd.hpp +34 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/deadline_timer_service.hpp +229 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/dependent_type.hpp +38 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_ops.hpp +119 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_read_op.hpp +121 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_write_op.hpp +121 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/dev_poll_reactor.hpp +208 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/epoll_reactor.hpp +244 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/event.hpp +50 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/eventfd_select_interrupter.hpp +85 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/fd_set_adapter.hpp +41 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/fenced_block.hpp +82 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/function.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_arm_fenced_block.hpp +91 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_hppa_fenced_block.hpp +68 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_sync_fenced_block.hpp +65 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_x86_fenced_block.hpp +99 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_alloc_helpers.hpp +82 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_cont_helpers.hpp +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_invoke_helpers.hpp +57 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_tracking.hpp +161 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_type_requirements.hpp +480 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/hash_map.hpp +333 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/buffer_sequence_adapter.ipp +120 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/descriptor_ops.ipp +453 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.hpp +80 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.ipp +432 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/epoll_reactor.hpp +78 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/epoll_reactor.ipp +688 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/eventfd_select_interrupter.ipp +167 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/handler_tracking.ipp +307 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/kqueue_reactor.hpp +82 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/kqueue_reactor.ipp +498 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/pipe_select_interrupter.ipp +126 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_event.ipp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_mutex.ipp +48 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_thread.ipp +76 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_tss_ptr.ipp +48 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_descriptor_service.ipp +210 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_serial_port_service.ipp +153 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_socket_service_base.ipp +269 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/resolver_service_base.ipp +132 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.hpp +89 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.ipp +315 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/service_registry.hpp +90 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/service_registry.ipp +190 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/signal_set_service.ipp +649 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_ops.ipp +3470 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_select_interrupter.ipp +178 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_service.hpp +120 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_service.ipp +178 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/task_io_service.hpp +80 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/task_io_service.ipp +476 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/throw_error.ipp +47 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/timer_queue_ptime.ipp +86 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/timer_queue_set.ipp +103 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_control.hpp +136 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/keyword_tss_ptr.hpp +72 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/kqueue_reactor.hpp +222 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/limits.hpp +26 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/local_free_on_block_exit.hpp +61 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/macos_fenced_block.hpp +63 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/memory.hpp +31 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/mutex.hpp +50 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/noncopyable.hpp +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_event.hpp +90 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_fenced_block.hpp +47 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_mutex.hpp +66 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_reactor.hpp +69 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_signal_blocker.hpp +71 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_socket_service.hpp +500 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_static_mutex.hpp +62 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_thread.hpp +63 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_tss_ptr.hpp +70 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/object_pool.hpp +148 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/old_win_sdk_compat.hpp +216 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/op_queue.hpp +158 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/operation.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/pipe_select_interrupter.hpp +91 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/pop_options.hpp +131 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_event.hpp +128 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_fd_set_adapter.hpp +120 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_mutex.hpp +78 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_signal_blocker.hpp +87 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_static_mutex.hpp +66 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_thread.hpp +107 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_tss_ptr.hpp +81 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/push_options.hpp +166 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_descriptor_service.hpp +324 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_null_buffers_op.hpp +90 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_serial_port_service.hpp +236 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_accept_op.hpp +138 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_connect_op.hpp +108 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recv_op.hpp +125 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recvfrom_op.hpp +135 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recvmsg_op.hpp +127 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_send_op.hpp +122 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_sendto_op.hpp +125 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service.hpp +460 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service_base.hpp +452 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor.hpp +32 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_fwd.hpp +42 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_op.hpp +63 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_op_queue.hpp +170 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/regex_fwd.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_endpoint_op.hpp +123 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_op.hpp +133 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolver_service.hpp +131 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolver_service_base.hpp +131 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scoped_lock.hpp +103 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scoped_ptr.hpp +81 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/select_interrupter.hpp +48 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/select_reactor.hpp +221 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/service_registry.hpp +146 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/shared_ptr.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_blocker.hpp +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_handler.hpp +84 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_init.hpp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_op.hpp +51 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_set_service.hpp +218 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_holder.hpp +100 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_ops.hpp +336 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_option.hpp +318 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_select_interrupter.hpp +93 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_types.hpp +410 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/solaris_fenced_block.hpp +63 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/static_mutex.hpp +54 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_event.hpp +178 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_fenced_block.hpp +64 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_mutex.hpp +75 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_static_mutex.hpp +83 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_thread.hpp +67 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/strand_service.hpp +144 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/task_io_service.hpp +203 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/task_io_service_operation.hpp +78 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/task_io_service_thread_info.hpp +42 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread.hpp +58 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_info_base.hpp +93 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/throw_error.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/throw_exception.hpp +53 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue.hpp +333 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_base.hpp +70 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_ptime.hpp +95 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_set.hpp +68 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_scheduler.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_scheduler_fwd.hpp +42 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/tss_ptr.hpp +71 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/type_traits.hpp +60 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/variadic_templates.hpp +63 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wait_handler.hpp +85 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wait_op.hpp +47 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/weak_ptr.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/win_iocp_serial_port_service.hpp +230 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/winsock_init.hpp +130 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wrapped_handler.hpp +293 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/error.hpp +345 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/basic_endpoint.hpp +195 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/datagram_protocol.hpp +125 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/detail/endpoint.hpp +135 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/detail/impl/endpoint.ipp +111 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/raw_protocol.hpp +123 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/seq_packet_protocol.hpp +124 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/stream_protocol.hpp +129 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/handler_alloc_hook.hpp +83 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/handler_continuation_hook.hpp +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/handler_invoke_hook.hpp +87 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/handler_type.hpp +114 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/high_resolution_timer.hpp +65 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_read_stream.hpp +360 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_write_stream.hpp +340 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect.hpp +432 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/error.ipp +130 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/handler_alloc_hook.ipp +79 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_service.hpp +156 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_service.ipp +157 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read.hpp +755 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_at.hpp +812 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_until.hpp +1149 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/serial_port_base.hpp +61 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/serial_port_base.ipp +556 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/spawn.hpp +355 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/src.cpp +25 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/src.hpp +73 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/use_future.hpp +179 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write.hpp +767 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write_at.hpp +827 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/io_service.hpp +772 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address.hpp +202 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4.hpp +243 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6.hpp +248 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_endpoint.hpp +265 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver.hpp +270 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_entry.hpp +96 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_iterator.hpp +262 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_query.hpp +246 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/endpoint.hpp +141 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/impl/endpoint.ipp +206 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/socket_option.hpp +571 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/host_name.hpp +44 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/icmp.hpp +117 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address.ipp +228 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v4.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v4.ipp +180 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.ipp +300 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/basic_endpoint.hpp +57 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/host_name.ipp +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/multicast.hpp +193 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_query_base.hpp +132 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_service.hpp +178 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/tcp.hpp +157 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/udp.hpp +113 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/unicast.hpp +72 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/v6_only.hpp +71 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/is_read_buffered.hpp +61 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/is_write_buffered.hpp +61 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/basic_endpoint.hpp +241 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/connect_pair.hpp +106 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/datagram_protocol.hpp +82 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/detail/endpoint.hpp +135 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/detail/impl/endpoint.ipp +130 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/stream_protocol.hpp +92 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/placeholders.hpp +125 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_descriptor.hpp +492 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_stream_descriptor.hpp +364 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/descriptor_base.hpp +99 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/stream_descriptor.hpp +39 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/stream_descriptor_service.hpp +262 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/raw_socket_service.hpp +438 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/read.hpp +633 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/read_at.hpp +666 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/read_until.hpp +925 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/seq_packet_socket_service.hpp +386 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port.hpp +38 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port_base.hpp +169 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port_service.hpp +255 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/signal_set.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/signal_set_service.hpp +136 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/socket_acceptor_service.hpp +308 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/socket_base.hpp +522 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/spawn.hpp +267 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/basic_context.hpp +42 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context.hpp +789 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context_base.hpp +194 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context_service.hpp +42 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/buffered_handshake_op.hpp +112 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/engine.hpp +166 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/handshake_op.hpp +70 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/engine.ipp +327 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/openssl_init.ipp +166 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/io.hpp +351 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/openssl_init.hpp +103 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/openssl_types.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/password_callback.hpp +74 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/read_op.hpp +75 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/shutdown_op.hpp +62 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/stream_core.hpp +128 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/verify_callback.hpp +70 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/write_op.hpp +75 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/error.hpp +115 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.hpp +73 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.ipp +1177 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/error.ipp +102 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/rfc2818_verification.ipp +168 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/src.hpp +28 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/basic_context.hpp +436 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/context_service.hpp +176 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/detail/openssl_context_service.hpp +396 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/detail/openssl_operation.hpp +526 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/detail/openssl_stream_service.hpp +573 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/stream.hpp +503 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/stream_service.hpp +186 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/rfc2818_verification.hpp +102 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream.hpp +758 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream_base.hpp +54 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream_service.hpp +42 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/verify_context.hpp +75 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/verify_mode.hpp +65 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/steady_timer.hpp +63 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/strand.hpp +254 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/stream_socket_service.hpp +382 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/streambuf.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/system_timer.hpp +59 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/time_traits.hpp +88 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/unyield.hpp +21 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/use_future.hpp +94 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/version.hpp +23 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/wait_traits.hpp +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/waitable_timer_service.hpp +170 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_handle.hpp +283 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_object_handle.hpp +180 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_random_access_handle.hpp +378 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_stream_handle.hpp +361 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/object_handle.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/object_handle_service.hpp +179 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/overlapped_ptr.hpp +118 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/random_access_handle.hpp +39 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/random_access_handle_service.hpp +222 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/stream_handle.hpp +39 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/stream_handle_service.hpp +220 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/write.hpp +620 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/write_at.hpp +672 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/yield.hpp +23 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono.hpp +20 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/chrono.hpp +15 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/chrono_io.hpp +34 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/chrono.hpp +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/mac/chrono.hpp +242 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp +356 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/mac/thread_clock.hpp +92 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/posix/chrono.hpp +121 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp +354 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/posix/thread_clock.hpp +92 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/process_cpu_clocks.hpp +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/thread_clock.hpp +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/no_warning/signed_unsigned_cmp.hpp +54 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/scan_keyword.hpp +163 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/floor.hpp +36 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/include.hpp +23 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_get.hpp +593 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_io.hpp +295 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_put.hpp +317 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_style.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_units.hpp +1003 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/ios_base_state.hpp +152 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/time_point_get.hpp +330 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/time_point_io.hpp +1243 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/time_point_put.hpp +261 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/time_point_units.hpp +260 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/timezone.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/ios_base_state_ptr.hpp +437 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/manip_base.hpp +101 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp +50 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io_v1/chrono_io.hpp +637 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/process_cpu_clocks.hpp +525 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/round.hpp +59 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/thread_clock.hpp +75 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/typeof/boost/chrono/chrono.hpp +32 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/typeof/boost/ratio.hpp +24 -0
- data/src/cxx_supportlib/vendor-modified/boost/detail/atomic_count.hpp +21 -0
- data/src/cxx_supportlib/vendor-modified/boost/integer/common_factor.hpp +16 -0
- data/src/cxx_supportlib/vendor-modified/boost/integer/common_factor_rt.hpp +460 -0
- data/src/cxx_supportlib/vendor-modified/boost/integer/integer_log2.hpp +112 -0
- data/src/cxx_supportlib/vendor-modified/boost/integer/integer_mask.hpp +126 -0
- data/src/cxx_supportlib/vendor-modified/boost/integer/static_min_max.hpp +51 -0
- data/src/cxx_supportlib/vendor-modified/boost/libs/chrono/src/chrono.cpp +15 -0
- data/src/cxx_supportlib/vendor-modified/boost/libs/chrono/src/process_cpu_clocks.cpp +18 -0
- data/src/cxx_supportlib/vendor-modified/boost/libs/chrono/src/thread_clock.cpp +19 -0
- data/src/cxx_supportlib/vendor-modified/boost/libs/random/src/random_device.cpp +250 -0
- data/src/cxx_supportlib/vendor-modified/boost/pointer_cast.hpp +121 -0
- data/src/cxx_supportlib/vendor-modified/boost/random.hpp +91 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/additive_combine.hpp +283 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/bernoulli_distribution.hpp +197 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/beta_distribution.hpp +184 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/binomial_distribution.hpp +434 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/cauchy_distribution.hpp +214 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/chi_squared_distribution.hpp +209 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/auto_link.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/config.hpp +18 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/const_mod.hpp +216 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/disable_warnings.hpp +29 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/enable_warnings.hpp +22 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/generator_bits.hpp +36 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/generator_seed_seq.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/int_float_pair.hpp +121 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/integer_log2.hpp +84 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/iterator_mixin.hpp +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/large_arithmetic.hpp +122 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/operators.hpp +84 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/polynomial.hpp +384 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/ptr_helper.hpp +67 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/seed.hpp +115 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/seed_impl.hpp +398 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/signed_unsigned_tools.hpp +89 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/uniform_int_float.hpp +76 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/vector_io.hpp +75 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/discard_block.hpp +241 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/discrete_distribution.hpp +636 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/exponential_distribution.hpp +386 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/extreme_value_distribution.hpp +177 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/fisher_f_distribution.hpp +183 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/gamma_distribution.hpp +292 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/generate_canonical.hpp +96 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/geometric_distribution.hpp +267 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/hyperexponential_distribution.hpp +883 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/independent_bits.hpp +271 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/inversive_congruential.hpp +267 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/lagged_fibonacci.hpp +537 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/laplace_distribution.hpp +175 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/linear_congruential.hpp +466 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/linear_feedback_shift.hpp +217 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/lognormal_distribution.hpp +254 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/mersenne_twister.hpp +682 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/negative_binomial_distribution.hpp +220 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/non_central_chi_squared_distribution.hpp +221 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/normal_distribution.hpp +374 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/piecewise_constant_distribution.hpp +466 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/piecewise_linear_distribution.hpp +531 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/poisson_distribution.hpp +360 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/random_device.hpp +143 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/random_number_generator.hpp +73 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/ranlux.hpp +99 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/seed_seq.hpp +118 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/shuffle_order.hpp +269 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/shuffle_output.hpp +51 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/student_t_distribution.hpp +180 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/subtract_with_carry.hpp +613 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/taus88.hpp +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/traits.hpp +107 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/triangle_distribution.hpp +232 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/uniform_01.hpp +257 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/uniform_int.hpp +99 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/uniform_int_distribution.hpp +419 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/uniform_on_sphere.hpp +284 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/uniform_real.hpp +82 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/uniform_real_distribution.hpp +241 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/uniform_smallint.hpp +307 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/variate_generator.hpp +122 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/weibull_distribution.hpp +177 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/xor_combine.hpp +208 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio.hpp +14 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/ratio_io.hpp +1342 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/include.hpp +16 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/abs.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/arithmetic.hpp +22 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/comparison.hpp +19 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/divides.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/equal_to.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/gcd.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/greater.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/greater_equal.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/lcm.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/less.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/less_equal.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/minus.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/negate.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/not_equal_to.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/numeric_cast.hpp +31 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/plus.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/rational_c_tag.hpp +25 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/rational_constant.hpp +15 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/sign.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/times.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/ratio_io.hpp +1076 -0
- data/src/cxx_supportlib/vendor-modified/boost/rational.hpp +1002 -0
- data/src/cxx_supportlib/vendor-modified/modp_b64.cpp +11 -0
- data/src/helper-scripts/rack-preloader.rb +1 -1
- data/src/nginx_module/{ConfigurationCommands.c → ConfigGeneral/AutoGeneratedDefinitions.c} +351 -134
- data/src/nginx_module/{ConfigurationCommands.c.cxxcodebuilder → ConfigGeneral/AutoGeneratedDefinitions.c.cxxcodebuilder} +14 -25
- data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c +396 -0
- data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c.cxxcodebuilder +160 -0
- data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c +831 -0
- data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c.cxxcodebuilder +168 -0
- data/src/nginx_module/ConfigGeneral/ManifestGeneration.c +887 -0
- data/src/nginx_module/ConfigGeneral/ManifestGeneration.h +100 -0
- data/src/nginx_module/Configuration.c +165 -621
- data/src/nginx_module/Configuration.h +43 -33
- data/src/nginx_module/ContentHandler.c +46 -40
- data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c +282 -0
- data/src/nginx_module/{CreateLocationConfig.c.cxxcodebuilder → LocationConfig/AutoGeneratedCreateFunction.c.cxxcodebuilder} +43 -17
- data/src/nginx_module/{CacheLocationConfig.c → LocationConfig/AutoGeneratedHeaderSerialization.c} +148 -180
- data/src/nginx_module/{CacheLocationConfig.c.cxxcodebuilder → LocationConfig/AutoGeneratedHeaderSerialization.c.cxxcodebuilder} +13 -11
- data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c +595 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c.cxxcodebuilder +190 -0
- data/src/nginx_module/{MergeLocationConfig.c → LocationConfig/AutoGeneratedMergeFunction.c} +32 -42
- data/src/nginx_module/{MergeLocationConfig.c.cxxcodebuilder → LocationConfig/AutoGeneratedMergeFunction.c.cxxcodebuilder} +18 -11
- data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h +220 -0
- data/src/nginx_module/{LocationConfig.h.cxxcodebuilder → LocationConfig/AutoGeneratedStruct.h.cxxcodebuilder} +70 -48
- data/src/nginx_module/MainConfig/AutoGeneratedCreateFunction.c +163 -0
- data/src/nginx_module/MainConfig/AutoGeneratedCreateFunction.c.cxxcodebuilder +125 -0
- data/src/nginx_module/MainConfig/AutoGeneratedManifestGeneration.c +303 -0
- data/src/nginx_module/MainConfig/AutoGeneratedManifestGeneration.c.cxxcodebuilder +173 -0
- data/src/nginx_module/MainConfig/AutoGeneratedStruct.h +133 -0
- data/src/nginx_module/MainConfig/AutoGeneratedStruct.h.cxxcodebuilder +154 -0
- data/src/nginx_module/config +13 -4
- data/src/nginx_module/ngx_http_passenger_module.c +154 -84
- data/src/ruby_supportlib/phusion_passenger.rb +2 -2
- data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +613 -131
- data/src/ruby_supportlib/phusion_passenger/apache2/config_utils.rb +52 -0
- data/src/ruby_supportlib/phusion_passenger/common_library.rb +18 -4
- data/src/ruby_supportlib/phusion_passenger/config/main.rb +2 -0
- data/src/ruby_supportlib/phusion_passenger/config/system_properties_command.rb +104 -0
- data/src/ruby_supportlib/phusion_passenger/constants.rb +0 -2
- data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +470 -138
- data/src/ruby_supportlib/phusion_passenger/packaging.rb +1 -0
- data/src/ruby_supportlib/phusion_passenger/platform_info.rb +17 -0
- data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +11 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +7 -7
- data/src/ruby_supportlib/phusion_passenger/platform_info/networking.rb +293 -0
- data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +8 -54
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb +1 -5
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command/builtin_engine.rb +4 -7
- data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller.rb +1 -1
- data/src/schema_printer/SchemaPrinterMain.cpp +78 -0
- data/src/schema_printer/SchemaPrinterMain.cpp.cxxcodebuilder +116 -0
- metadata +671 -30
- data/src/apache2_module/Configuration.cpp +0 -737
- data/src/apache2_module/Configuration.hpp +0 -274
- data/src/apache2_module/ConfigurationCommands.cpp +0 -199
- data/src/apache2_module/ConfigurationFields.hpp +0 -187
- data/src/apache2_module/ConfigurationSetters.cpp +0 -436
- data/src/apache2_module/ConfigurationSetters.cpp.cxxcodebuilder +0 -144
- data/src/apache2_module/CreateDirConfig.cpp +0 -68
- data/src/apache2_module/CreateDirConfig.cpp.cxxcodebuilder +0 -81
- data/src/apache2_module/MergeDirConfig.cpp +0 -155
- data/src/apache2_module/SetHeaders.cpp +0 -111
- data/src/nginx_module/CreateLocationConfig.c +0 -100
- data/src/nginx_module/LocationConfig.h +0 -95
@@ -0,0 +1,861 @@
|
|
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_FRAME_HPP
|
29
|
+
#define WEBSOCKETPP_FRAME_HPP
|
30
|
+
|
31
|
+
#include <algorithm>
|
32
|
+
#include <string>
|
33
|
+
|
34
|
+
#include <websocketpp/common/system_error.hpp>
|
35
|
+
#include <websocketpp/common/network.hpp>
|
36
|
+
|
37
|
+
#include <websocketpp/utilities.hpp>
|
38
|
+
|
39
|
+
namespace websocketpp {
|
40
|
+
/// Data structures and utility functions for manipulating WebSocket frames
|
41
|
+
/**
|
42
|
+
* namespace frame provides a number of data structures and utility functions
|
43
|
+
* for reading, writing, and manipulating binary encoded WebSocket frames.
|
44
|
+
*/
|
45
|
+
namespace frame {
|
46
|
+
|
47
|
+
/// Minimum length of a WebSocket frame header.
|
48
|
+
static unsigned int const BASIC_HEADER_LENGTH = 2;
|
49
|
+
/// Maximum length of a WebSocket header
|
50
|
+
static unsigned int const MAX_HEADER_LENGTH = 14;
|
51
|
+
/// Maximum length of the variable portion of the WebSocket header
|
52
|
+
static unsigned int const MAX_EXTENDED_HEADER_LENGTH = 12;
|
53
|
+
|
54
|
+
/// Two byte conversion union
|
55
|
+
union uint16_converter {
|
56
|
+
uint16_t i;
|
57
|
+
uint8_t c[2];
|
58
|
+
};
|
59
|
+
|
60
|
+
/// Four byte conversion union
|
61
|
+
union uint32_converter {
|
62
|
+
uint32_t i;
|
63
|
+
uint8_t c[4];
|
64
|
+
};
|
65
|
+
|
66
|
+
/// Eight byte conversion union
|
67
|
+
union uint64_converter {
|
68
|
+
uint64_t i;
|
69
|
+
uint8_t c[8];
|
70
|
+
};
|
71
|
+
|
72
|
+
/// Constants and utility functions related to WebSocket opcodes
|
73
|
+
/**
|
74
|
+
* WebSocket Opcodes are 4 bits. See RFC6455 section 5.2.
|
75
|
+
*/
|
76
|
+
namespace opcode {
|
77
|
+
enum value {
|
78
|
+
continuation = 0x0,
|
79
|
+
text = 0x1,
|
80
|
+
binary = 0x2,
|
81
|
+
rsv3 = 0x3,
|
82
|
+
rsv4 = 0x4,
|
83
|
+
rsv5 = 0x5,
|
84
|
+
rsv6 = 0x6,
|
85
|
+
rsv7 = 0x7,
|
86
|
+
close = 0x8,
|
87
|
+
ping = 0x9,
|
88
|
+
pong = 0xA,
|
89
|
+
control_rsvb = 0xB,
|
90
|
+
control_rsvc = 0xC,
|
91
|
+
control_rsvd = 0xD,
|
92
|
+
control_rsve = 0xE,
|
93
|
+
control_rsvf = 0xF,
|
94
|
+
|
95
|
+
CONTINUATION = 0x0,
|
96
|
+
TEXT = 0x1,
|
97
|
+
BINARY = 0x2,
|
98
|
+
RSV3 = 0x3,
|
99
|
+
RSV4 = 0x4,
|
100
|
+
RSV5 = 0x5,
|
101
|
+
RSV6 = 0x6,
|
102
|
+
RSV7 = 0x7,
|
103
|
+
CLOSE = 0x8,
|
104
|
+
PING = 0x9,
|
105
|
+
PONG = 0xA,
|
106
|
+
CONTROL_RSVB = 0xB,
|
107
|
+
CONTROL_RSVC = 0xC,
|
108
|
+
CONTROL_RSVD = 0xD,
|
109
|
+
CONTROL_RSVE = 0xE,
|
110
|
+
CONTROL_RSVF = 0xF
|
111
|
+
};
|
112
|
+
|
113
|
+
/// Check if an opcode is reserved
|
114
|
+
/**
|
115
|
+
* @param v The opcode to test.
|
116
|
+
* @return Whether or not the opcode is reserved.
|
117
|
+
*/
|
118
|
+
inline bool reserved(value v) {
|
119
|
+
return (v >= rsv3 && v <= rsv7) ||
|
120
|
+
(v >= control_rsvb && v <= control_rsvf);
|
121
|
+
}
|
122
|
+
|
123
|
+
/// Check if an opcode is invalid
|
124
|
+
/**
|
125
|
+
* Invalid opcodes are negative or require greater than 4 bits to store.
|
126
|
+
*
|
127
|
+
* @param v The opcode to test.
|
128
|
+
* @return Whether or not the opcode is invalid.
|
129
|
+
*/
|
130
|
+
inline bool invalid(value v) {
|
131
|
+
return (v > 0xF || v < 0);
|
132
|
+
}
|
133
|
+
|
134
|
+
/// Check if an opcode is for a control frame
|
135
|
+
/**
|
136
|
+
* @param v The opcode to test.
|
137
|
+
* @return Whether or not the opcode is a control opcode.
|
138
|
+
*/
|
139
|
+
inline bool is_control(value v) {
|
140
|
+
return v >= 0x8;
|
141
|
+
}
|
142
|
+
}
|
143
|
+
|
144
|
+
/// Constants related to frame and payload limits
|
145
|
+
namespace limits {
|
146
|
+
/// Minimum length of a WebSocket frame header.
|
147
|
+
static unsigned int const basic_header_length = 2;
|
148
|
+
|
149
|
+
/// Maximum length of a WebSocket header
|
150
|
+
static unsigned int const max_header_length = 14;
|
151
|
+
|
152
|
+
/// Maximum length of the variable portion of the WebSocket header
|
153
|
+
static unsigned int const max_extended_header_length = 12;
|
154
|
+
|
155
|
+
/// Maximum size of a basic WebSocket payload
|
156
|
+
static uint8_t const payload_size_basic = 125;
|
157
|
+
|
158
|
+
/// Maximum size of an extended WebSocket payload (basic payload = 126)
|
159
|
+
static uint16_t const payload_size_extended = 0xFFFF; // 2^16, 65535
|
160
|
+
|
161
|
+
/// Maximum size of a jumbo WebSocket payload (basic payload = 127)
|
162
|
+
static uint64_t const payload_size_jumbo = 0x7FFFFFFFFFFFFFFFLL;//2^63
|
163
|
+
|
164
|
+
/// Maximum size of close frame reason
|
165
|
+
/**
|
166
|
+
* This is payload_size_basic - 2 bytes (as first two bytes are used for
|
167
|
+
* the close code
|
168
|
+
*/
|
169
|
+
static uint8_t const close_reason_size = 123;
|
170
|
+
}
|
171
|
+
|
172
|
+
|
173
|
+
// masks for fields in the basic header
|
174
|
+
static uint8_t const BHB0_OPCODE = 0x0F;
|
175
|
+
static uint8_t const BHB0_RSV3 = 0x10;
|
176
|
+
static uint8_t const BHB0_RSV2 = 0x20;
|
177
|
+
static uint8_t const BHB0_RSV1 = 0x40;
|
178
|
+
static uint8_t const BHB0_FIN = 0x80;
|
179
|
+
|
180
|
+
static uint8_t const BHB1_PAYLOAD = 0x7F;
|
181
|
+
static uint8_t const BHB1_MASK = 0x80;
|
182
|
+
|
183
|
+
static uint8_t const payload_size_code_16bit = 0x7E; // 126
|
184
|
+
static uint8_t const payload_size_code_64bit = 0x7F; // 127
|
185
|
+
|
186
|
+
typedef uint32_converter masking_key_type;
|
187
|
+
|
188
|
+
/// The constant size component of a WebSocket frame header
|
189
|
+
struct basic_header {
|
190
|
+
basic_header() : b0(0x00),b1(0x00) {}
|
191
|
+
|
192
|
+
basic_header(uint8_t p0, uint8_t p1) : b0(p0), b1(p1) {}
|
193
|
+
|
194
|
+
basic_header(opcode::value op, uint64_t size, bool fin, bool mask,
|
195
|
+
bool rsv1 = false, bool rsv2 = false, bool rsv3 = false) : b0(0x00),
|
196
|
+
b1(0x00)
|
197
|
+
{
|
198
|
+
if (fin) {
|
199
|
+
b0 |= BHB0_FIN;
|
200
|
+
}
|
201
|
+
if (rsv1) {
|
202
|
+
b0 |= BHB0_RSV1;
|
203
|
+
}
|
204
|
+
if (rsv2) {
|
205
|
+
b0 |= BHB0_RSV2;
|
206
|
+
}
|
207
|
+
if (rsv3) {
|
208
|
+
b0 |= BHB0_RSV3;
|
209
|
+
}
|
210
|
+
b0 |= (op & BHB0_OPCODE);
|
211
|
+
|
212
|
+
if (mask) {
|
213
|
+
b1 |= BHB1_MASK;
|
214
|
+
}
|
215
|
+
|
216
|
+
uint8_t basic_value;
|
217
|
+
|
218
|
+
if (size <= limits::payload_size_basic) {
|
219
|
+
basic_value = static_cast<uint8_t>(size);
|
220
|
+
} else if (size <= limits::payload_size_extended) {
|
221
|
+
basic_value = payload_size_code_16bit;
|
222
|
+
} else {
|
223
|
+
basic_value = payload_size_code_64bit;
|
224
|
+
}
|
225
|
+
|
226
|
+
|
227
|
+
b1 |= basic_value;
|
228
|
+
}
|
229
|
+
|
230
|
+
uint8_t b0;
|
231
|
+
uint8_t b1;
|
232
|
+
};
|
233
|
+
|
234
|
+
/// The variable size component of a WebSocket frame header
|
235
|
+
struct extended_header {
|
236
|
+
extended_header() {
|
237
|
+
std::fill_n(this->bytes,MAX_EXTENDED_HEADER_LENGTH,0x00);
|
238
|
+
}
|
239
|
+
|
240
|
+
extended_header(uint64_t payload_size) {
|
241
|
+
std::fill_n(this->bytes,MAX_EXTENDED_HEADER_LENGTH,0x00);
|
242
|
+
|
243
|
+
copy_payload(payload_size);
|
244
|
+
}
|
245
|
+
|
246
|
+
extended_header(uint64_t payload_size, uint32_t masking_key) {
|
247
|
+
std::fill_n(this->bytes,MAX_EXTENDED_HEADER_LENGTH,0x00);
|
248
|
+
|
249
|
+
// Copy payload size
|
250
|
+
int offset = copy_payload(payload_size);
|
251
|
+
|
252
|
+
// Copy Masking Key
|
253
|
+
uint32_converter temp32;
|
254
|
+
temp32.i = masking_key;
|
255
|
+
std::copy(temp32.c,temp32.c+4,bytes+offset);
|
256
|
+
}
|
257
|
+
|
258
|
+
uint8_t bytes[MAX_EXTENDED_HEADER_LENGTH];
|
259
|
+
private:
|
260
|
+
int copy_payload(uint64_t payload_size) {
|
261
|
+
int payload_offset = 0;
|
262
|
+
|
263
|
+
if (payload_size <= limits::payload_size_basic) {
|
264
|
+
payload_offset = 8;
|
265
|
+
} else if (payload_size <= limits::payload_size_extended) {
|
266
|
+
payload_offset = 6;
|
267
|
+
}
|
268
|
+
|
269
|
+
uint64_converter temp64;
|
270
|
+
temp64.i = lib::net::_htonll(payload_size);
|
271
|
+
std::copy(temp64.c+payload_offset,temp64.c+8,bytes);
|
272
|
+
|
273
|
+
return 8-payload_offset;
|
274
|
+
}
|
275
|
+
};
|
276
|
+
|
277
|
+
bool get_fin(basic_header const &h);
|
278
|
+
void set_fin(basic_header &h, bool value);
|
279
|
+
bool get_rsv1(basic_header const &h);
|
280
|
+
void set_rsv1(basic_header &h, bool value);
|
281
|
+
bool get_rsv2(basic_header const &h);
|
282
|
+
void set_rsv2(basic_header &h, bool value);
|
283
|
+
bool get_rsv3(basic_header const &h);
|
284
|
+
void set_rsv3(basic_header &h, bool value);
|
285
|
+
opcode::value get_opcode(basic_header const &h);
|
286
|
+
bool get_masked(basic_header const &h);
|
287
|
+
void set_masked(basic_header &h, bool value);
|
288
|
+
uint8_t get_basic_size(basic_header const &);
|
289
|
+
size_t get_header_len(basic_header const &);
|
290
|
+
unsigned int get_masking_key_offset(basic_header const &);
|
291
|
+
|
292
|
+
std::string write_header(basic_header const &, extended_header const &);
|
293
|
+
masking_key_type get_masking_key(basic_header const &, extended_header const &);
|
294
|
+
uint16_t get_extended_size(extended_header const &);
|
295
|
+
uint64_t get_jumbo_size(extended_header const &);
|
296
|
+
uint64_t get_payload_size(basic_header const &, extended_header const &);
|
297
|
+
|
298
|
+
size_t prepare_masking_key(masking_key_type const & key);
|
299
|
+
size_t circshift_prepared_key(size_t prepared_key, size_t offset);
|
300
|
+
|
301
|
+
// Functions for performing xor based masking and unmasking
|
302
|
+
template <typename input_iter, typename output_iter>
|
303
|
+
void byte_mask(input_iter b, input_iter e, output_iter o, masking_key_type
|
304
|
+
const & key, size_t key_offset = 0);
|
305
|
+
template <typename iter_type>
|
306
|
+
void byte_mask(iter_type b, iter_type e, masking_key_type const & key,
|
307
|
+
size_t key_offset = 0);
|
308
|
+
void word_mask_exact(uint8_t * input, uint8_t * output, size_t length,
|
309
|
+
masking_key_type const & key);
|
310
|
+
void word_mask_exact(uint8_t * data, size_t length, masking_key_type const &
|
311
|
+
key);
|
312
|
+
size_t word_mask_circ(uint8_t * input, uint8_t * output, size_t length,
|
313
|
+
size_t prepared_key);
|
314
|
+
size_t word_mask_circ(uint8_t * data, size_t length, size_t prepared_key);
|
315
|
+
|
316
|
+
/// Check whether the frame's FIN bit is set.
|
317
|
+
/**
|
318
|
+
* @param [in] h The basic header to extract from.
|
319
|
+
* @return True if the header's fin bit is set.
|
320
|
+
*/
|
321
|
+
inline bool get_fin(basic_header const & h) {
|
322
|
+
return ((h.b0 & BHB0_FIN) == BHB0_FIN);
|
323
|
+
}
|
324
|
+
|
325
|
+
/// Set the frame's FIN bit
|
326
|
+
/**
|
327
|
+
* @param [out] h Header to set.
|
328
|
+
* @param [in] value Value to set it to.
|
329
|
+
*/
|
330
|
+
inline void set_fin(basic_header & h, bool value) {
|
331
|
+
h.b0 = (value ? h.b0 | BHB0_FIN : h.b0 & ~BHB0_FIN);
|
332
|
+
}
|
333
|
+
|
334
|
+
/// check whether the frame's RSV1 bit is set
|
335
|
+
/**
|
336
|
+
* @param [in] h The basic header to extract from.
|
337
|
+
* @return True if the header's RSV1 bit is set.
|
338
|
+
*/
|
339
|
+
inline bool get_rsv1(const basic_header &h) {
|
340
|
+
return ((h.b0 & BHB0_RSV1) == BHB0_RSV1);
|
341
|
+
}
|
342
|
+
|
343
|
+
/// Set the frame's RSV1 bit
|
344
|
+
/**
|
345
|
+
* @param [out] h Header to set.
|
346
|
+
* @param [in] value Value to set it to.
|
347
|
+
*/
|
348
|
+
inline void set_rsv1(basic_header &h, bool value) {
|
349
|
+
h.b0 = (value ? h.b0 | BHB0_RSV1 : h.b0 & ~BHB0_RSV1);
|
350
|
+
}
|
351
|
+
|
352
|
+
/// check whether the frame's RSV2 bit is set
|
353
|
+
/**
|
354
|
+
* @param [in] h The basic header to extract from.
|
355
|
+
* @return True if the header's RSV2 bit is set.
|
356
|
+
*/
|
357
|
+
inline bool get_rsv2(const basic_header &h) {
|
358
|
+
return ((h.b0 & BHB0_RSV2) == BHB0_RSV2);
|
359
|
+
}
|
360
|
+
|
361
|
+
/// Set the frame's RSV2 bit
|
362
|
+
/**
|
363
|
+
* @param [out] h Header to set.
|
364
|
+
* @param [in] value Value to set it to.
|
365
|
+
*/
|
366
|
+
inline void set_rsv2(basic_header &h, bool value) {
|
367
|
+
h.b0 = (value ? h.b0 | BHB0_RSV2 : h.b0 & ~BHB0_RSV2);
|
368
|
+
}
|
369
|
+
|
370
|
+
/// check whether the frame's RSV3 bit is set
|
371
|
+
/**
|
372
|
+
* @param [in] h The basic header to extract from.
|
373
|
+
* @return True if the header's RSV3 bit is set.
|
374
|
+
*/
|
375
|
+
inline bool get_rsv3(const basic_header &h) {
|
376
|
+
return ((h.b0 & BHB0_RSV3) == BHB0_RSV3);
|
377
|
+
}
|
378
|
+
|
379
|
+
/// Set the frame's RSV3 bit
|
380
|
+
/**
|
381
|
+
* @param [out] h Header to set.
|
382
|
+
* @param [in] value Value to set it to.
|
383
|
+
*/
|
384
|
+
inline void set_rsv3(basic_header &h, bool value) {
|
385
|
+
h.b0 = (value ? h.b0 | BHB0_RSV3 : h.b0 & ~BHB0_RSV3);
|
386
|
+
}
|
387
|
+
|
388
|
+
/// Extract opcode from basic header
|
389
|
+
/**
|
390
|
+
* @param [in] h The basic header to extract from.
|
391
|
+
* @return The opcode value of the header.
|
392
|
+
*/
|
393
|
+
inline opcode::value get_opcode(const basic_header &h) {
|
394
|
+
return opcode::value(h.b0 & BHB0_OPCODE);
|
395
|
+
}
|
396
|
+
|
397
|
+
/// check whether the frame is masked
|
398
|
+
/**
|
399
|
+
* @param [in] h The basic header to extract from.
|
400
|
+
* @return True if the header mask bit is set.
|
401
|
+
*/
|
402
|
+
inline bool get_masked(basic_header const & h) {
|
403
|
+
return ((h.b1 & BHB1_MASK) == BHB1_MASK);
|
404
|
+
}
|
405
|
+
|
406
|
+
/// Set the frame's MASK bit
|
407
|
+
/**
|
408
|
+
* @param [out] h Header to set.
|
409
|
+
* @param value Value to set it to.
|
410
|
+
*/
|
411
|
+
inline void set_masked(basic_header & h, bool value) {
|
412
|
+
h.b1 = (value ? h.b1 | BHB1_MASK : h.b1 & ~BHB1_MASK);
|
413
|
+
}
|
414
|
+
|
415
|
+
/// Extracts the raw payload length specified in the basic header
|
416
|
+
/**
|
417
|
+
* A basic WebSocket frame header contains a 7 bit value that represents the
|
418
|
+
* payload size. There are two reserved values that are used to indicate that
|
419
|
+
* the actual payload size will not fit in 7 bits and that the full payload
|
420
|
+
* size is included in a separate field. The values are as follows:
|
421
|
+
*
|
422
|
+
* PAYLOAD_SIZE_CODE_16BIT (0x7E) indicates that the actual payload is less
|
423
|
+
* than 16 bit
|
424
|
+
*
|
425
|
+
* PAYLOAD_SIZE_CODE_64BIT (0x7F) indicates that the actual payload is less
|
426
|
+
* than 63 bit
|
427
|
+
*
|
428
|
+
* @param [in] h Basic header to read value from.
|
429
|
+
* @return The exact size encoded in h.
|
430
|
+
*/
|
431
|
+
inline uint8_t get_basic_size(const basic_header &h) {
|
432
|
+
return h.b1 & BHB1_PAYLOAD;
|
433
|
+
}
|
434
|
+
|
435
|
+
/// Calculates the full length of the header based on the first bytes.
|
436
|
+
/**
|
437
|
+
* A WebSocket frame header always has at least two bytes. Encoded within the
|
438
|
+
* first two bytes is all the information necessary to calculate the full
|
439
|
+
* (variable) header length. get_header_len() calculates the full header
|
440
|
+
* length for the given two byte basic header.
|
441
|
+
*
|
442
|
+
* @param h Basic frame header to extract size from.
|
443
|
+
* @return Full length of the extended header.
|
444
|
+
*/
|
445
|
+
inline size_t get_header_len(basic_header const & h) {
|
446
|
+
// TODO: check extensions?
|
447
|
+
|
448
|
+
// masking key offset represents the space used for the extended length
|
449
|
+
// fields
|
450
|
+
size_t size = BASIC_HEADER_LENGTH + get_masking_key_offset(h);
|
451
|
+
|
452
|
+
// If the header is masked there is a 4 byte masking key
|
453
|
+
if (get_masked(h)) {
|
454
|
+
size += 4;
|
455
|
+
}
|
456
|
+
|
457
|
+
return size;
|
458
|
+
}
|
459
|
+
|
460
|
+
/// Calculate the offset location of the masking key within the extended header
|
461
|
+
/**
|
462
|
+
* Calculate the offset location of the masking key within the extended header
|
463
|
+
* using information from its corresponding basic header
|
464
|
+
*
|
465
|
+
* @param h Corresponding basic header to calculate from.
|
466
|
+
*
|
467
|
+
* @return byte offset of the first byte of the masking key
|
468
|
+
*/
|
469
|
+
inline unsigned int get_masking_key_offset(const basic_header &h) {
|
470
|
+
if (get_basic_size(h) == payload_size_code_16bit) {
|
471
|
+
return 2;
|
472
|
+
} else if (get_basic_size(h) == payload_size_code_64bit) {
|
473
|
+
return 8;
|
474
|
+
} else {
|
475
|
+
return 0;
|
476
|
+
}
|
477
|
+
}
|
478
|
+
|
479
|
+
/// Generate a properly sized contiguous string that encodes a full frame header
|
480
|
+
/**
|
481
|
+
* Copy the basic header h and extended header e into a properly sized
|
482
|
+
* contiguous frame header string for the purposes of writing out to the wire.
|
483
|
+
*
|
484
|
+
* @param h The basic header to include
|
485
|
+
* @param e The extended header to include
|
486
|
+
*
|
487
|
+
* @return A contiguous string containing h and e
|
488
|
+
*/
|
489
|
+
inline std::string prepare_header(const basic_header &h, const
|
490
|
+
extended_header &e)
|
491
|
+
{
|
492
|
+
std::string ret;
|
493
|
+
|
494
|
+
ret.push_back(char(h.b0));
|
495
|
+
ret.push_back(char(h.b1));
|
496
|
+
ret.append(
|
497
|
+
reinterpret_cast<const char*>(e.bytes),
|
498
|
+
get_header_len(h)-BASIC_HEADER_LENGTH
|
499
|
+
);
|
500
|
+
|
501
|
+
return ret;
|
502
|
+
}
|
503
|
+
|
504
|
+
/// Extract the masking key from a frame header
|
505
|
+
/**
|
506
|
+
* Note that while read and written as an integer at times, this value is not
|
507
|
+
* an integer and should never be interpreted as one. Big and little endian
|
508
|
+
* machines will generate and store masking keys differently without issue as
|
509
|
+
* long as the integer values remain irrelivant.
|
510
|
+
*
|
511
|
+
* @param h The basic header to extract from
|
512
|
+
* @param e The extended header to extract from
|
513
|
+
*
|
514
|
+
* @return The masking key as an integer.
|
515
|
+
*/
|
516
|
+
inline masking_key_type get_masking_key(const basic_header &h, const
|
517
|
+
extended_header &e)
|
518
|
+
{
|
519
|
+
masking_key_type temp32;
|
520
|
+
|
521
|
+
if (!get_masked(h)) {
|
522
|
+
temp32.i = 0;
|
523
|
+
} else {
|
524
|
+
unsigned int offset = get_masking_key_offset(h);
|
525
|
+
std::copy(e.bytes+offset,e.bytes+offset+4,temp32.c);
|
526
|
+
}
|
527
|
+
|
528
|
+
return temp32;
|
529
|
+
}
|
530
|
+
|
531
|
+
/// Extract the extended size field from an extended header
|
532
|
+
/**
|
533
|
+
* It is the responsibility of the caller to verify that e is a valid extended
|
534
|
+
* header. This function assumes that e contains an extended payload size.
|
535
|
+
*
|
536
|
+
* @param e The extended header to extract from
|
537
|
+
*
|
538
|
+
* @return The size encoded in the extended header in host byte order
|
539
|
+
*/
|
540
|
+
inline uint16_t get_extended_size(const extended_header &e) {
|
541
|
+
uint16_converter temp16;
|
542
|
+
std::copy(e.bytes,e.bytes+2,temp16.c);
|
543
|
+
return ntohs(temp16.i);
|
544
|
+
}
|
545
|
+
|
546
|
+
/// Extract the jumbo size field from an extended header
|
547
|
+
/**
|
548
|
+
* It is the responsibility of the caller to verify that e is a valid extended
|
549
|
+
* header. This function assumes that e contains a jumbo payload size.
|
550
|
+
*
|
551
|
+
* @param e The extended header to extract from
|
552
|
+
*
|
553
|
+
* @return The size encoded in the extended header in host byte order
|
554
|
+
*/
|
555
|
+
inline uint64_t get_jumbo_size(const extended_header &e) {
|
556
|
+
uint64_converter temp64;
|
557
|
+
std::copy(e.bytes,e.bytes+8,temp64.c);
|
558
|
+
return lib::net::_ntohll(temp64.i);
|
559
|
+
}
|
560
|
+
|
561
|
+
/// Extract the full payload size field from a WebSocket header
|
562
|
+
/**
|
563
|
+
* It is the responsibility of the caller to verify that h and e together
|
564
|
+
* represent a valid WebSocket frame header. This function assumes only that h
|
565
|
+
* and e are valid. It uses information in the basic header to determine where
|
566
|
+
* to look for the payload_size
|
567
|
+
*
|
568
|
+
* @param h The basic header to extract from
|
569
|
+
* @param e The extended header to extract from
|
570
|
+
*
|
571
|
+
* @return The size encoded in the combined header in host byte order.
|
572
|
+
*/
|
573
|
+
inline uint64_t get_payload_size(const basic_header &h, const
|
574
|
+
extended_header &e)
|
575
|
+
{
|
576
|
+
uint8_t val = get_basic_size(h);
|
577
|
+
|
578
|
+
if (val <= limits::payload_size_basic) {
|
579
|
+
return val;
|
580
|
+
} else if (val == payload_size_code_16bit) {
|
581
|
+
return get_extended_size(e);
|
582
|
+
} else {
|
583
|
+
return get_jumbo_size(e);
|
584
|
+
}
|
585
|
+
}
|
586
|
+
|
587
|
+
/// Extract a masking key into a value the size of a machine word.
|
588
|
+
/**
|
589
|
+
* Machine word size must be 4 or 8.
|
590
|
+
*
|
591
|
+
* @param key Masking key to extract from
|
592
|
+
*
|
593
|
+
* @return prepared key as a machine word
|
594
|
+
*/
|
595
|
+
inline size_t prepare_masking_key(const masking_key_type& key) {
|
596
|
+
size_t low_bits = static_cast<size_t>(key.i);
|
597
|
+
|
598
|
+
if (sizeof(size_t) == 8) {
|
599
|
+
uint64_t high_bits = static_cast<size_t>(key.i);
|
600
|
+
return static_cast<size_t>((high_bits << 32) | low_bits);
|
601
|
+
} else {
|
602
|
+
return low_bits;
|
603
|
+
}
|
604
|
+
}
|
605
|
+
|
606
|
+
/// circularly shifts the supplied prepared masking key by offset bytes
|
607
|
+
/**
|
608
|
+
* Prepared_key must be the output of prepare_masking_key with the associated
|
609
|
+
* restrictions on the machine word size. offset must be greater than or equal
|
610
|
+
* to zero and less than sizeof(size_t).
|
611
|
+
*/
|
612
|
+
inline size_t circshift_prepared_key(size_t prepared_key, size_t offset) {
|
613
|
+
if (lib::net::is_little_endian()) {
|
614
|
+
size_t temp = prepared_key << (sizeof(size_t)-offset)*8;
|
615
|
+
return (prepared_key >> offset*8) | temp;
|
616
|
+
} else {
|
617
|
+
size_t temp = prepared_key >> (sizeof(size_t)-offset)*8;
|
618
|
+
return (prepared_key << offset*8) | temp;
|
619
|
+
}
|
620
|
+
}
|
621
|
+
|
622
|
+
/// Byte by byte mask/unmask
|
623
|
+
/**
|
624
|
+
* Iterator based byte by byte masking and unmasking for WebSocket payloads.
|
625
|
+
* Performs masking in place using the supplied key offset by the supplied
|
626
|
+
* offset number of bytes.
|
627
|
+
*
|
628
|
+
* This function is simple and can be done in place on input with arbitrary
|
629
|
+
* lengths and does not vary based on machine word size. It is slow.
|
630
|
+
*
|
631
|
+
* @param b Beginning iterator to start masking
|
632
|
+
*
|
633
|
+
* @param e Ending iterator to end masking
|
634
|
+
*
|
635
|
+
* @param o Beginning iterator to store masked results
|
636
|
+
*
|
637
|
+
* @param key 32 bit key to mask with.
|
638
|
+
*
|
639
|
+
* @param key_offset offset value to start masking at.
|
640
|
+
*/
|
641
|
+
template <typename input_iter, typename output_iter>
|
642
|
+
void byte_mask(input_iter first, input_iter last, output_iter result,
|
643
|
+
masking_key_type const & key, size_t key_offset)
|
644
|
+
{
|
645
|
+
size_t key_index = key_offset%4;
|
646
|
+
while (first != last) {
|
647
|
+
*result = *first ^ key.c[key_index++];
|
648
|
+
key_index %= 4;
|
649
|
+
++result;
|
650
|
+
++first;
|
651
|
+
}
|
652
|
+
}
|
653
|
+
|
654
|
+
/// Byte by byte mask/unmask (in place)
|
655
|
+
/**
|
656
|
+
* Iterator based byte by byte masking and unmasking for WebSocket payloads.
|
657
|
+
* Performs masking in place using the supplied key offset by the supplied
|
658
|
+
* offset number of bytes.
|
659
|
+
*
|
660
|
+
* This function is simple and can be done in place on input with arbitrary
|
661
|
+
* lengths and does not vary based on machine word size. It is slow.
|
662
|
+
*
|
663
|
+
* @param b Beginning iterator to start masking
|
664
|
+
*
|
665
|
+
* @param e Ending iterator to end masking
|
666
|
+
*
|
667
|
+
* @param key 32 bit key to mask with.
|
668
|
+
*
|
669
|
+
* @param key_offset offset value to start masking at.
|
670
|
+
*/
|
671
|
+
template <typename iter_type>
|
672
|
+
void byte_mask(iter_type b, iter_type e, masking_key_type const & key,
|
673
|
+
size_t key_offset)
|
674
|
+
{
|
675
|
+
byte_mask(b,e,b,key,key_offset);
|
676
|
+
}
|
677
|
+
|
678
|
+
/// Exact word aligned mask/unmask
|
679
|
+
/**
|
680
|
+
* Balanced combination of byte by byte and circular word by word masking.
|
681
|
+
* Best used to mask complete messages at once. Has much higher setup costs than
|
682
|
+
* word_mask_circ but works with exact sized buffers.
|
683
|
+
*
|
684
|
+
* Buffer based word by word masking and unmasking for WebSocket payloads.
|
685
|
+
* Masking is done in word by word chunks with the remainder not divisible by
|
686
|
+
* the word size done byte by byte.
|
687
|
+
*
|
688
|
+
* input and output must both be at least length bytes. Exactly length bytes
|
689
|
+
* will be written.
|
690
|
+
*
|
691
|
+
* @param input buffer to mask or unmask
|
692
|
+
*
|
693
|
+
* @param output buffer to store the output. May be the same as input.
|
694
|
+
*
|
695
|
+
* @param length length of data buffer
|
696
|
+
*
|
697
|
+
* @param key Masking key to use
|
698
|
+
*/
|
699
|
+
inline void word_mask_exact(uint8_t* input, uint8_t* output, size_t length,
|
700
|
+
const masking_key_type& key)
|
701
|
+
{
|
702
|
+
size_t prepared_key = prepare_masking_key(key);
|
703
|
+
size_t n = length/sizeof(size_t);
|
704
|
+
size_t* input_word = reinterpret_cast<size_t*>(input);
|
705
|
+
size_t* output_word = reinterpret_cast<size_t*>(output);
|
706
|
+
|
707
|
+
for (size_t i = 0; i < n; i++) {
|
708
|
+
output_word[i] = input_word[i] ^ prepared_key;
|
709
|
+
}
|
710
|
+
|
711
|
+
for (size_t i = n*sizeof(size_t); i < length; i++) {
|
712
|
+
output[i] = input[i] ^ key.c[i%4];
|
713
|
+
}
|
714
|
+
}
|
715
|
+
|
716
|
+
/// Exact word aligned mask/unmask (in place)
|
717
|
+
/**
|
718
|
+
* In place version of word_mask_exact
|
719
|
+
*
|
720
|
+
* @see word_mask_exact
|
721
|
+
*
|
722
|
+
* @param data buffer to read and write from
|
723
|
+
*
|
724
|
+
* @param length length of data buffer
|
725
|
+
*
|
726
|
+
* @param key Masking key to use
|
727
|
+
*/
|
728
|
+
inline void word_mask_exact(uint8_t* data, size_t length, const
|
729
|
+
masking_key_type& key)
|
730
|
+
{
|
731
|
+
word_mask_exact(data,data,length,key);
|
732
|
+
}
|
733
|
+
|
734
|
+
/// Circular word aligned mask/unmask
|
735
|
+
/**
|
736
|
+
* Performs a circular mask/unmask in word sized chunks using pre-prepared keys
|
737
|
+
* that store state between calls. Best for providing streaming masking or
|
738
|
+
* unmasking of small chunks at a time of a larger message. Requires that the
|
739
|
+
* underlying allocated size of the data buffer be a multiple of the word size.
|
740
|
+
* Data in the buffer after `length` will be overwritten only with the same
|
741
|
+
* values that were originally present.
|
742
|
+
*
|
743
|
+
* Buffer based word by word masking and unmasking for WebSocket payloads.
|
744
|
+
* Performs masking in place using the supplied key. Casts the data buffer to
|
745
|
+
* an array of size_t's and performs masking word by word. The underlying
|
746
|
+
* buffer size must be a muliple of the word size.
|
747
|
+
*
|
748
|
+
* word_mask returns a copy of prepared_key circularly shifted based on the
|
749
|
+
* length value. The returned value may be fed back into word_mask when more
|
750
|
+
* data is available.
|
751
|
+
*
|
752
|
+
* input and output must both have length at least:
|
753
|
+
* ceil(length/sizeof(size_t))*sizeof(size_t)
|
754
|
+
* Exactly that many bytes will be written, although only exactly length bytes
|
755
|
+
* will be changed (trailing bytes will be replaced without masking)
|
756
|
+
*
|
757
|
+
* @param data Character buffer to mask
|
758
|
+
*
|
759
|
+
* @param length Length of data
|
760
|
+
*
|
761
|
+
* @param prepared_key Prepared key to use.
|
762
|
+
*
|
763
|
+
* @return the prepared_key shifted to account for the input length
|
764
|
+
*/
|
765
|
+
inline size_t word_mask_circ(uint8_t * input, uint8_t * output, size_t length,
|
766
|
+
size_t prepared_key)
|
767
|
+
{
|
768
|
+
size_t n = length / sizeof(size_t); // whole words
|
769
|
+
size_t l = length - (n * sizeof(size_t)); // remaining bytes
|
770
|
+
size_t * input_word = reinterpret_cast<size_t *>(input);
|
771
|
+
size_t * output_word = reinterpret_cast<size_t *>(output);
|
772
|
+
|
773
|
+
// mask word by word
|
774
|
+
for (size_t i = 0; i < n; i++) {
|
775
|
+
output_word[i] = input_word[i] ^ prepared_key;
|
776
|
+
}
|
777
|
+
|
778
|
+
// mask partial word at the end
|
779
|
+
size_t start = length - l;
|
780
|
+
uint8_t * byte_key = reinterpret_cast<uint8_t *>(&prepared_key);
|
781
|
+
for (size_t i = 0; i < l; ++i) {
|
782
|
+
output[start+i] = input[start+i] ^ byte_key[i];
|
783
|
+
}
|
784
|
+
|
785
|
+
return circshift_prepared_key(prepared_key,l);
|
786
|
+
}
|
787
|
+
|
788
|
+
/// Circular word aligned mask/unmask (in place)
|
789
|
+
/**
|
790
|
+
* In place version of word_mask_circ
|
791
|
+
*
|
792
|
+
* @see word_mask_circ
|
793
|
+
*
|
794
|
+
* @param data Character buffer to read from and write to
|
795
|
+
*
|
796
|
+
* @param length Length of data
|
797
|
+
*
|
798
|
+
* @param prepared_key Prepared key to use.
|
799
|
+
*
|
800
|
+
* @return the prepared_key shifted to account for the input length
|
801
|
+
*/
|
802
|
+
inline size_t word_mask_circ(uint8_t* data, size_t length, size_t prepared_key){
|
803
|
+
return word_mask_circ(data,data,length,prepared_key);
|
804
|
+
}
|
805
|
+
|
806
|
+
/// Circular byte aligned mask/unmask
|
807
|
+
/**
|
808
|
+
* Performs a circular mask/unmask in byte sized chunks using pre-prepared keys
|
809
|
+
* that store state between calls. Best for providing streaming masking or
|
810
|
+
* unmasking of small chunks at a time of a larger message. Requires that the
|
811
|
+
* underlying allocated size of the data buffer be a multiple of the word size.
|
812
|
+
* Data in the buffer after `length` will be overwritten only with the same
|
813
|
+
* values that were originally present.
|
814
|
+
*
|
815
|
+
* word_mask returns a copy of prepared_key circularly shifted based on the
|
816
|
+
* length value. The returned value may be fed back into byte_mask when more
|
817
|
+
* data is available.
|
818
|
+
*
|
819
|
+
* @param data Character buffer to mask
|
820
|
+
*
|
821
|
+
* @param length Length of data
|
822
|
+
*
|
823
|
+
* @param prepared_key Prepared key to use.
|
824
|
+
*
|
825
|
+
* @return the prepared_key shifted to account for the input length
|
826
|
+
*/
|
827
|
+
inline size_t byte_mask_circ(uint8_t * input, uint8_t * output, size_t length,
|
828
|
+
size_t prepared_key)
|
829
|
+
{
|
830
|
+
uint32_converter key;
|
831
|
+
key.i = prepared_key;
|
832
|
+
|
833
|
+
for (size_t i = 0; i < length; ++i) {
|
834
|
+
output[i] = input[i] ^ key.c[i % 4];
|
835
|
+
}
|
836
|
+
|
837
|
+
return circshift_prepared_key(prepared_key,length % 4);
|
838
|
+
}
|
839
|
+
|
840
|
+
/// Circular byte aligned mask/unmask (in place)
|
841
|
+
/**
|
842
|
+
* In place version of byte_mask_circ
|
843
|
+
*
|
844
|
+
* @see byte_mask_circ
|
845
|
+
*
|
846
|
+
* @param data Character buffer to read from and write to
|
847
|
+
*
|
848
|
+
* @param length Length of data
|
849
|
+
*
|
850
|
+
* @param prepared_key Prepared key to use.
|
851
|
+
*
|
852
|
+
* @return the prepared_key shifted to account for the input length
|
853
|
+
*/
|
854
|
+
inline size_t byte_mask_circ(uint8_t* data, size_t length, size_t prepared_key){
|
855
|
+
return byte_mask_circ(data,data,length,prepared_key);
|
856
|
+
}
|
857
|
+
|
858
|
+
} // namespace frame
|
859
|
+
} // namespace websocketpp
|
860
|
+
|
861
|
+
#endif //WEBSOCKETPP_FRAME_HPP
|