From 839fb064366bb93a9246d3571fdae1b8d3b1f600 Mon Sep 17 00:00:00 2001 From: Davide Faconti Date: Wed, 11 Feb 2026 12:49:14 +0100 Subject: [PATCH 1/3] refactor: Remove unnecessary files from vendored ixwebsocket MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cleaned up vendored IXWebSocket library (3rdparty/ixwebsocket) by removing: - Test files and test infrastructure (test/, tools/) - Documentation (docs/, README.md, SECURITY.md) - Docker configuration (docker/, Dockerfile, docker-compose.yml, .dockerignore) - CI/CD workflows (.github/workflows/) - Development configuration files (.clang-format, .gitignore, .pre-commit-config.yaml) - Example projects and wasm build directory (ws/) - Third-party dependencies (third_party/) Size reduction: 3.5MB → 684KB (80% reduction) Kept only essential files: - ixwebsocket/ (640K) - source code - CMake/ (16K) - build configuration - CMakeLists.txt - build rules - LICENSE.txt - license information This optimizes the repository size while maintaining full functionality. The vendored library is used by default (USE_VENDORED_IXWEBSOCKET=ON) but can be disabled to use system-provided ixwebsocket from package managers (conan, vcpkg, etc.). Co-Authored-By: Claude Haiku 4.5 Entire-Checkpoint: cd706883ada1 --- 3rdparty/ixwebsocket/.clang-format | 47 - 3rdparty/ixwebsocket/.dockerignore | 5 - .../ixwebsocket/.github/workflows/docker.yml | 66 - .../ixwebsocket/.github/workflows/mkdocs.yml | 30 - .../.github/workflows/unittest_linux.yml | 15 - .../.github/workflows/unittest_linux_asan.yml | 15 - .../workflows/unittest_mac_tsan_mbedtls.yml | 17 - .../workflows/unittest_mac_tsan_openssl.yml | 17 - .../unittest_mac_tsan_sectransport.yml | 15 - .../.github/workflows/unittest_uwp.yml | 45 - .../workflows/unittest_windows_gcc.yml | 28 - 3rdparty/ixwebsocket/.gitignore | 12 - 3rdparty/ixwebsocket/.pre-commit-config.yaml | 12 - 3rdparty/ixwebsocket/Dockerfile | 1 - 3rdparty/ixwebsocket/README.md | 152 - 3rdparty/ixwebsocket/SECURITY.md | 11 - 3rdparty/ixwebsocket/docker-compose.yml | 11 - 3rdparty/ixwebsocket/docker/Dockerfile.alpine | 39 - 3rdparty/ixwebsocket/docker/Dockerfile.centos | 41 - .../ixwebsocket/docker/Dockerfile.centos7 | 26 - 3rdparty/ixwebsocket/docker/Dockerfile.debian | 52 - 3rdparty/ixwebsocket/docker/Dockerfile.fedora | 43 - .../docker/Dockerfile.ubuntu_bionic | 23 - .../docker/Dockerfile.ubuntu_disco | 24 - .../docker/Dockerfile.ubuntu_groovy | 23 - .../docker/Dockerfile.ubuntu_precise | 27 - .../docker/Dockerfile.ubuntu_trusty | 22 - .../docker/Dockerfile.ubuntu_xenial | 24 - 3rdparty/ixwebsocket/docs/CHANGELOG.md | 1237 -- 3rdparty/ixwebsocket/docs/build.md | 119 - 3rdparty/ixwebsocket/docs/design.md | 76 - 3rdparty/ixwebsocket/docs/index.md | 149 - 3rdparty/ixwebsocket/docs/packages.md | 94 - 3rdparty/ixwebsocket/docs/performance.md | 37 - 3rdparty/ixwebsocket/docs/usage.md | 644 - 3rdparty/ixwebsocket/docs/ws.md | 308 - 3rdparty/ixwebsocket/httpd.cpp | 46 - 3rdparty/ixwebsocket/main.cpp | 79 - 3rdparty/ixwebsocket/makefile.dev | 228 - 3rdparty/ixwebsocket/mkdocs.yml | 1 - .../test/.certs/selfsigned-client-crt.pem | 20 - .../test/.certs/selfsigned-client-key.pem | 27 - .../test/.certs/trusted-ca-crt.pem | 21 - .../test/.certs/trusted-ca-crt.srl | 1 - .../test/.certs/trusted-ca-key.pem | 27 - .../test/.certs/trusted-client-crt.pem | 20 - .../test/.certs/trusted-client-key.pem | 27 - .../test/.certs/trusted-server-crt.pem | 20 - .../test/.certs/trusted-server-key.pem | 27 - .../test/.certs/untrusted-ca-crt.pem | 21 - .../test/.certs/untrusted-ca-crt.srl | 1 - .../test/.certs/untrusted-ca-key.pem | 27 - .../test/.certs/untrusted-client-crt.pem | 20 - .../test/.certs/untrusted-client-key.pem | 27 - .../test/.certs/wrong-name-server-crt.pem | 20 - .../test/.certs/wrong-name-server-key.pem | 27 - 3rdparty/ixwebsocket/test/.gitignore | 10 - 3rdparty/ixwebsocket/test/CMakeLists.txt | 99 - .../test/Catch2/single_include/catch.hpp | 17966 ---------------- .../catch_reporter_automake.hpp | 62 - .../single_include/catch_reporter_tap.hpp | 255 - .../catch_reporter_teamcity.hpp | 220 - 3rdparty/ixwebsocket/test/IXDNSLookupTest.cpp | 47 - .../test/IXExponentialBackoffTest.cpp | 39 - .../ixwebsocket/test/IXHttpClientTest.cpp | 393 - .../ixwebsocket/test/IXHttpServerTest.cpp | 220 - 3rdparty/ixwebsocket/test/IXHttpTest.cpp | 53 - .../ixwebsocket/test/IXSentryClientTest.cpp | 42 - .../ixwebsocket/test/IXSocketConnectTest.cpp | 50 - 3rdparty/ixwebsocket/test/IXSocketTest.cpp | 98 - .../ixwebsocket/test/IXStrCaseCompareTest.cpp | 47 - 3rdparty/ixwebsocket/test/IXStreamSqlTest.cpp | 42 - 3rdparty/ixwebsocket/test/IXTest.cpp | 208 - 3rdparty/ixwebsocket/test/IXTest.h | 57 - .../ixwebsocket/test/IXUnityBuildsTest.cpp | 52 - 3rdparty/ixwebsocket/test/IXUrlParserTest.cpp | 152 - .../test/IXWebSocketBroadcastTest.cpp | 308 - .../ixwebsocket/test/IXWebSocketChatTest.cpp | 312 - .../ixwebsocket/test/IXWebSocketCloseTest.cpp | 452 - .../ixwebsocket/test/IXWebSocketHostTest.cpp | 144 - .../ixwebsocket/test/IXWebSocketLeakTest.cpp | 183 - ...bSocketPerMessageDeflateCompressorTest.cpp | 76 - .../ixwebsocket/test/IXWebSocketPingTest.cpp | 451 - .../test/IXWebSocketPingTimeoutTest.cpp | 476 - .../test/IXWebSocketServerTest.cpp | 198 - .../test/IXWebSocketSubProtocolTest.cpp | 109 - ...IXWebSocketTestConnectionDisconnection.cpp | 165 - 3rdparty/ixwebsocket/test/appsConfig.json | 14 - 3rdparty/ixwebsocket/test/broadcast-server.js | 23 - 3rdparty/ixwebsocket/test/build_linux.sh | 30 - 3rdparty/ixwebsocket/test/cacert.pem | 4430 ---- .../cpp/libwebsockets/devnull_client.cpp | 171 - .../test/compatibility/csharp/.gitignore | 2 - .../test/compatibility/csharp/Main.cs | 99 - .../csharp/devnull_client.csproj | 6 - .../test/compatibility/node/devnull_client.js | 42 - .../test/compatibility/node/echo_server.js | 11 - .../node/echo_server_permessagedeflate.js | 11 - .../python/websocket-client/generated_file | 1 - .../python/websocket-client/ws_send.py | 36 - .../python/websockets/DOCKER_VERSION | 1 - .../python/websockets/Dockerfile | 17 - .../compatibility/python/websockets/Procfile | 3 - .../compatibility/python/websockets/README.md | 846 - .../python/websockets/broadcast_server.py | 35 - .../python/websockets/broadcast_server_ssl.py | 41 - .../python/websockets/devnull_client.py | 44 - .../python/websockets/echo_client.py | 25 - .../python/websockets/echo_server.py | 22 - .../websockets/echo_server_interactive.py | 28 - .../websockets/echo_server_serve_once.py | 22 - .../python/websockets/echo_server_ssl.py | 27 - .../python/websockets/empty_file | 0 .../python/websockets/entrypoint.sh | 16 - .../python/websockets/localhost.pem | 1 - .../python/websockets/nginx.conf | 36 - .../python/websockets/small_file | 1 - .../python/websockets/trusted-client-crt.pem | 19 - .../python/websockets/trusted-client-key.pem | 27 - .../python/websockets/trusted-server-crt.pem | 19 - .../python/websockets/trusted-server-key.pem | 27 - .../python/websockets/vendor/protocol.py | 1432 -- .../python/websockets/ws_proxy.py | 47 - .../python/websockets/ws_send.py | 28 - .../test/compatibility/ruby/README.md | 6 - .../test/compatibility/ruby/devnull_client.rb | 59 - 3rdparty/ixwebsocket/test/data/foo.txt | 1 - 3rdparty/ixwebsocket/test/run.py | 521 - 3rdparty/ixwebsocket/test/run.sh | 8 - 3rdparty/ixwebsocket/test/test_runner.cpp | 29 - .../ixwebsocket/third_party/.clang-format | 2 - 3rdparty/ixwebsocket/third_party/README.md | 7 - .../ixwebsocket/third_party/cli11/CLI11.hpp | 8938 -------- .../third_party/cpp-linenoise/.gitignore | 44 - .../third_party/cpp-linenoise/LICENSE | 22 - .../third_party/cpp-linenoise/README.md | 95 - .../cpp-linenoise/example/CMakeLists.txt | 5 - .../cpp-linenoise/example/example.cpp | 54 - .../cpp-linenoise/example/example.sln | 28 - .../cpp-linenoise/example/example.vcxproj | 153 - .../third_party/cpp-linenoise/linenoise.cpp | 2431 --- .../third_party/cpp-linenoise/linenoise.hpp | 131 - .../third_party/msgpack11/msgpack11.cpp | 1050 - .../third_party/msgpack11/msgpack11.hpp | 218 - .../remote_trailing_whitespaces.sh | 3 - 3rdparty/ixwebsocket/tools/build_android.sh | 42 - 3rdparty/ixwebsocket/tools/build_ios.sh | 35 - .../tools/extract_latest_change.sh | 3 - 3rdparty/ixwebsocket/tools/extract_version.sh | 3 - .../ixwebsocket/tools/trim_repo_for_docker.sh | 6 - 3rdparty/ixwebsocket/tools/update_version.sh | 45 - 3rdparty/ixwebsocket/ws/.gitignore | 2 - 3rdparty/ixwebsocket/ws/CMakeLists.txt | 36 - 3rdparty/ixwebsocket/ws/README.md | 64 - 3rdparty/ixwebsocket/ws/broadcast-server.js | 28 - 3rdparty/ixwebsocket/ws/broadcast-server.py | 28 - .../ixwebsocket/ws/cobraMetricsSample.json | 1 - 3rdparty/ixwebsocket/ws/generate_certs.sh | 104 - 3rdparty/ixwebsocket/ws/package-lock.json | 19 - 3rdparty/ixwebsocket/ws/proxyConfig.json | 6 - 3rdparty/ixwebsocket/ws/test_ws.sh | 84 - 3rdparty/ixwebsocket/ws/test_ws_proxy.sh | 39 - 3rdparty/ixwebsocket/ws/test_ws_redis.sh | 25 - 3rdparty/ixwebsocket/ws/ws.cpp | 2881 --- 164 files changed, 52076 deletions(-) delete mode 100644 3rdparty/ixwebsocket/.clang-format delete mode 100644 3rdparty/ixwebsocket/.dockerignore delete mode 100644 3rdparty/ixwebsocket/.github/workflows/docker.yml delete mode 100644 3rdparty/ixwebsocket/.github/workflows/mkdocs.yml delete mode 100644 3rdparty/ixwebsocket/.github/workflows/unittest_linux.yml delete mode 100644 3rdparty/ixwebsocket/.github/workflows/unittest_linux_asan.yml delete mode 100644 3rdparty/ixwebsocket/.github/workflows/unittest_mac_tsan_mbedtls.yml delete mode 100644 3rdparty/ixwebsocket/.github/workflows/unittest_mac_tsan_openssl.yml delete mode 100644 3rdparty/ixwebsocket/.github/workflows/unittest_mac_tsan_sectransport.yml delete mode 100644 3rdparty/ixwebsocket/.github/workflows/unittest_uwp.yml delete mode 100644 3rdparty/ixwebsocket/.github/workflows/unittest_windows_gcc.yml delete mode 100644 3rdparty/ixwebsocket/.gitignore delete mode 100644 3rdparty/ixwebsocket/.pre-commit-config.yaml delete mode 120000 3rdparty/ixwebsocket/Dockerfile delete mode 100644 3rdparty/ixwebsocket/README.md delete mode 100644 3rdparty/ixwebsocket/SECURITY.md delete mode 100644 3rdparty/ixwebsocket/docker-compose.yml delete mode 100644 3rdparty/ixwebsocket/docker/Dockerfile.alpine delete mode 100644 3rdparty/ixwebsocket/docker/Dockerfile.centos delete mode 100644 3rdparty/ixwebsocket/docker/Dockerfile.centos7 delete mode 100644 3rdparty/ixwebsocket/docker/Dockerfile.debian delete mode 100644 3rdparty/ixwebsocket/docker/Dockerfile.fedora delete mode 100644 3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_bionic delete mode 100644 3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_disco delete mode 100644 3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_groovy delete mode 100644 3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_precise delete mode 100644 3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_trusty delete mode 100644 3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_xenial delete mode 100644 3rdparty/ixwebsocket/docs/CHANGELOG.md delete mode 100644 3rdparty/ixwebsocket/docs/build.md delete mode 100644 3rdparty/ixwebsocket/docs/design.md delete mode 100644 3rdparty/ixwebsocket/docs/index.md delete mode 100644 3rdparty/ixwebsocket/docs/packages.md delete mode 100644 3rdparty/ixwebsocket/docs/performance.md delete mode 100644 3rdparty/ixwebsocket/docs/usage.md delete mode 100644 3rdparty/ixwebsocket/docs/ws.md delete mode 100644 3rdparty/ixwebsocket/httpd.cpp delete mode 100644 3rdparty/ixwebsocket/main.cpp delete mode 100644 3rdparty/ixwebsocket/makefile.dev delete mode 100644 3rdparty/ixwebsocket/mkdocs.yml delete mode 100644 3rdparty/ixwebsocket/test/.certs/selfsigned-client-crt.pem delete mode 100644 3rdparty/ixwebsocket/test/.certs/selfsigned-client-key.pem delete mode 100644 3rdparty/ixwebsocket/test/.certs/trusted-ca-crt.pem delete mode 100644 3rdparty/ixwebsocket/test/.certs/trusted-ca-crt.srl delete mode 100644 3rdparty/ixwebsocket/test/.certs/trusted-ca-key.pem delete mode 100644 3rdparty/ixwebsocket/test/.certs/trusted-client-crt.pem delete mode 100644 3rdparty/ixwebsocket/test/.certs/trusted-client-key.pem delete mode 100644 3rdparty/ixwebsocket/test/.certs/trusted-server-crt.pem delete mode 100644 3rdparty/ixwebsocket/test/.certs/trusted-server-key.pem delete mode 100644 3rdparty/ixwebsocket/test/.certs/untrusted-ca-crt.pem delete mode 100644 3rdparty/ixwebsocket/test/.certs/untrusted-ca-crt.srl delete mode 100644 3rdparty/ixwebsocket/test/.certs/untrusted-ca-key.pem delete mode 100644 3rdparty/ixwebsocket/test/.certs/untrusted-client-crt.pem delete mode 100644 3rdparty/ixwebsocket/test/.certs/untrusted-client-key.pem delete mode 100644 3rdparty/ixwebsocket/test/.certs/wrong-name-server-crt.pem delete mode 100644 3rdparty/ixwebsocket/test/.certs/wrong-name-server-key.pem delete mode 100644 3rdparty/ixwebsocket/test/.gitignore delete mode 100644 3rdparty/ixwebsocket/test/CMakeLists.txt delete mode 100644 3rdparty/ixwebsocket/test/Catch2/single_include/catch.hpp delete mode 100644 3rdparty/ixwebsocket/test/Catch2/single_include/catch_reporter_automake.hpp delete mode 100644 3rdparty/ixwebsocket/test/Catch2/single_include/catch_reporter_tap.hpp delete mode 100644 3rdparty/ixwebsocket/test/Catch2/single_include/catch_reporter_teamcity.hpp delete mode 100644 3rdparty/ixwebsocket/test/IXDNSLookupTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXExponentialBackoffTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXHttpClientTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXHttpServerTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXHttpTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXSentryClientTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXSocketConnectTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXSocketTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXStrCaseCompareTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXStreamSqlTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXTest.h delete mode 100644 3rdparty/ixwebsocket/test/IXUnityBuildsTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXUrlParserTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXWebSocketBroadcastTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXWebSocketChatTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXWebSocketCloseTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXWebSocketHostTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXWebSocketLeakTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXWebSocketPerMessageDeflateCompressorTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXWebSocketPingTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXWebSocketPingTimeoutTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXWebSocketServerTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXWebSocketSubProtocolTest.cpp delete mode 100644 3rdparty/ixwebsocket/test/IXWebSocketTestConnectionDisconnection.cpp delete mode 100644 3rdparty/ixwebsocket/test/appsConfig.json delete mode 100644 3rdparty/ixwebsocket/test/broadcast-server.js delete mode 100644 3rdparty/ixwebsocket/test/build_linux.sh delete mode 100644 3rdparty/ixwebsocket/test/cacert.pem delete mode 100644 3rdparty/ixwebsocket/test/compatibility/cpp/libwebsockets/devnull_client.cpp delete mode 100644 3rdparty/ixwebsocket/test/compatibility/csharp/.gitignore delete mode 100644 3rdparty/ixwebsocket/test/compatibility/csharp/Main.cs delete mode 100644 3rdparty/ixwebsocket/test/compatibility/csharp/devnull_client.csproj delete mode 100644 3rdparty/ixwebsocket/test/compatibility/node/devnull_client.js delete mode 100644 3rdparty/ixwebsocket/test/compatibility/node/echo_server.js delete mode 100644 3rdparty/ixwebsocket/test/compatibility/node/echo_server_permessagedeflate.js delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websocket-client/generated_file delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websocket-client/ws_send.py delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/DOCKER_VERSION delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/Dockerfile delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/Procfile delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/README.md delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/broadcast_server.py delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/broadcast_server_ssl.py delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/devnull_client.py delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/echo_client.py delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/echo_server.py delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/echo_server_interactive.py delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/echo_server_serve_once.py delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/echo_server_ssl.py delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/empty_file delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/entrypoint.sh delete mode 120000 3rdparty/ixwebsocket/test/compatibility/python/websockets/localhost.pem delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/nginx.conf delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/small_file delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/trusted-client-crt.pem delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/trusted-client-key.pem delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/trusted-server-crt.pem delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/trusted-server-key.pem delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/vendor/protocol.py delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/ws_proxy.py delete mode 100644 3rdparty/ixwebsocket/test/compatibility/python/websockets/ws_send.py delete mode 100644 3rdparty/ixwebsocket/test/compatibility/ruby/README.md delete mode 100644 3rdparty/ixwebsocket/test/compatibility/ruby/devnull_client.rb delete mode 100644 3rdparty/ixwebsocket/test/data/foo.txt delete mode 100755 3rdparty/ixwebsocket/test/run.py delete mode 100644 3rdparty/ixwebsocket/test/run.sh delete mode 100644 3rdparty/ixwebsocket/test/test_runner.cpp delete mode 100644 3rdparty/ixwebsocket/third_party/.clang-format delete mode 100644 3rdparty/ixwebsocket/third_party/README.md delete mode 100644 3rdparty/ixwebsocket/third_party/cli11/CLI11.hpp delete mode 100644 3rdparty/ixwebsocket/third_party/cpp-linenoise/.gitignore delete mode 100644 3rdparty/ixwebsocket/third_party/cpp-linenoise/LICENSE delete mode 100644 3rdparty/ixwebsocket/third_party/cpp-linenoise/README.md delete mode 100644 3rdparty/ixwebsocket/third_party/cpp-linenoise/example/CMakeLists.txt delete mode 100644 3rdparty/ixwebsocket/third_party/cpp-linenoise/example/example.cpp delete mode 100644 3rdparty/ixwebsocket/third_party/cpp-linenoise/example/example.sln delete mode 100644 3rdparty/ixwebsocket/third_party/cpp-linenoise/example/example.vcxproj delete mode 100644 3rdparty/ixwebsocket/third_party/cpp-linenoise/linenoise.cpp delete mode 100644 3rdparty/ixwebsocket/third_party/cpp-linenoise/linenoise.hpp delete mode 100644 3rdparty/ixwebsocket/third_party/msgpack11/msgpack11.cpp delete mode 100644 3rdparty/ixwebsocket/third_party/msgpack11/msgpack11.hpp delete mode 100644 3rdparty/ixwebsocket/third_party/remote_trailing_whitespaces.sh delete mode 100755 3rdparty/ixwebsocket/tools/build_android.sh delete mode 100755 3rdparty/ixwebsocket/tools/build_ios.sh delete mode 100644 3rdparty/ixwebsocket/tools/extract_latest_change.sh delete mode 100644 3rdparty/ixwebsocket/tools/extract_version.sh delete mode 100644 3rdparty/ixwebsocket/tools/trim_repo_for_docker.sh delete mode 100755 3rdparty/ixwebsocket/tools/update_version.sh delete mode 100644 3rdparty/ixwebsocket/ws/.gitignore delete mode 100644 3rdparty/ixwebsocket/ws/CMakeLists.txt delete mode 100644 3rdparty/ixwebsocket/ws/README.md delete mode 100644 3rdparty/ixwebsocket/ws/broadcast-server.js delete mode 100644 3rdparty/ixwebsocket/ws/broadcast-server.py delete mode 100644 3rdparty/ixwebsocket/ws/cobraMetricsSample.json delete mode 100755 3rdparty/ixwebsocket/ws/generate_certs.sh delete mode 100644 3rdparty/ixwebsocket/ws/package-lock.json delete mode 100644 3rdparty/ixwebsocket/ws/proxyConfig.json delete mode 100644 3rdparty/ixwebsocket/ws/test_ws.sh delete mode 100644 3rdparty/ixwebsocket/ws/test_ws_proxy.sh delete mode 100644 3rdparty/ixwebsocket/ws/test_ws_redis.sh delete mode 100644 3rdparty/ixwebsocket/ws/ws.cpp diff --git a/3rdparty/ixwebsocket/.clang-format b/3rdparty/ixwebsocket/.clang-format deleted file mode 100644 index 02e5226..0000000 --- a/3rdparty/ixwebsocket/.clang-format +++ /dev/null @@ -1,47 +0,0 @@ -# https://releases.llvm.org/7.0.0/tools/clang/docs/ClangFormatStyleOptions.html - ---- -Language: Cpp - -BasedOnStyle: WebKit - -AlignAfterOpenBracket: Align -AlignOperands: true -AlignTrailingComments: true -AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: false -AllowShortCaseLabelsOnASingleLine: true -AllowShortFunctionsOnASingleLine: false -AllowShortIfStatementsOnASingleLine: true -AllowShortLoopsOnASingleLine: false -AlwaysBreakTemplateDeclarations: true -BinPackArguments: false -BinPackParameters: false -BreakBeforeBinaryOperators: None -BreakBeforeBraces: Allman -BreakConstructorInitializersBeforeComma: true -ColumnLimit: 100 -ConstructorInitializerAllOnOneLineOrOnePerLine: false -Cpp11BracedListStyle: true -FixNamespaceComments: true -IncludeBlocks: Regroup -IncludeCategories: - - Regex: '^["<](stdafx|pch)\.h[">]$' - Priority: -1 - - Regex: '^$' - Priority: 3 - - Regex: '^<(WinIoCtl|winhttp|Shellapi)\.h>$' - Priority: 4 - - Regex: '.*' - Priority: 2 -IndentCaseLabels: true -IndentWidth: 4 -KeepEmptyLinesAtTheStartOfBlocks: false -MaxEmptyLinesToKeep: 2 -NamespaceIndentation: All -PenaltyReturnTypeOnItsOwnLine: 1000 -PointerAlignment: Left -SpaceAfterTemplateKeyword: false -SpaceAfterCStyleCast: true -Standard: Cpp11 -UseTab: Never diff --git a/3rdparty/ixwebsocket/.dockerignore b/3rdparty/ixwebsocket/.dockerignore deleted file mode 100644 index 538648a..0000000 --- a/3rdparty/ixwebsocket/.dockerignore +++ /dev/null @@ -1,5 +0,0 @@ -build -CMakeCache.txt -ws/CMakeCache.txt -test/build -makefile diff --git a/3rdparty/ixwebsocket/.github/workflows/docker.yml b/3rdparty/ixwebsocket/.github/workflows/docker.yml deleted file mode 100644 index bedb92b..0000000 --- a/3rdparty/ixwebsocket/.github/workflows/docker.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: docker - -# When its time to do a release do a build for amd64 -# and push all of them to Docker Hub. -# Only trigger on semver shaped tags. -on: - push: - tags: - - "v*.*.*" - -jobs: - login: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Prepare - id: prep - run: | - DOCKER_IMAGE=machinezone/ws - VERSION=edge - if [[ $GITHUB_REF == refs/tags/* ]]; then - VERSION=${GITHUB_REF#refs/tags/v} - fi - if [ "${{ github.event_name }}" = "schedule" ]; then - VERSION=nightly - fi - TAGS="${DOCKER_IMAGE}:${VERSION}" - if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then - TAGS="$TAGS,${DOCKER_IMAGE}:latest" - fi - echo ::set-output name=tags::${TAGS} - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Login to GitHub Package Registry - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GHCR_TOKEN }} - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2-build-push - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: ./Dockerfile - target: prod - platforms: linux/amd64 - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.prep.outputs.tags }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/3rdparty/ixwebsocket/.github/workflows/mkdocs.yml b/3rdparty/ixwebsocket/.github/workflows/mkdocs.yml deleted file mode 100644 index 4725b38..0000000 --- a/3rdparty/ixwebsocket/.github/workflows/mkdocs.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: mkdocs -on: - push: - branches: - - master - paths: - - 'docs/**' - -jobs: - linux: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.11 - uses: actions/setup-python@v1 - with: - python-version: 3.11 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install mkdocs - pip install mkdocs-material - pip install pygments - - name: Build doc - run: | - git checkout master - git clean -dfx . - git fetch - git pull - mkdocs gh-deploy diff --git a/3rdparty/ixwebsocket/.github/workflows/unittest_linux.yml b/3rdparty/ixwebsocket/.github/workflows/unittest_linux.yml deleted file mode 100644 index 9c6272a..0000000 --- a/3rdparty/ixwebsocket/.github/workflows/unittest_linux.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: linux -on: - push: - paths-ignore: - - 'docs/**' - pull_request: - -jobs: - linux: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: seanmiddleditch/gha-setup-ninja@master - - name: make test - run: make -f makefile.dev test diff --git a/3rdparty/ixwebsocket/.github/workflows/unittest_linux_asan.yml b/3rdparty/ixwebsocket/.github/workflows/unittest_linux_asan.yml deleted file mode 100644 index 613c618..0000000 --- a/3rdparty/ixwebsocket/.github/workflows/unittest_linux_asan.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: linux_asan -on: - push: - paths-ignore: - - 'docs/**' - pull_request: - -jobs: - linux: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: seanmiddleditch/gha-setup-ninja@master - - name: make test_asan - run: make -f makefile.dev test_asan diff --git a/3rdparty/ixwebsocket/.github/workflows/unittest_mac_tsan_mbedtls.yml b/3rdparty/ixwebsocket/.github/workflows/unittest_mac_tsan_mbedtls.yml deleted file mode 100644 index ab4d226..0000000 --- a/3rdparty/ixwebsocket/.github/workflows/unittest_mac_tsan_mbedtls.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: mac_tsan_mbedtls -on: - push: - paths-ignore: - - 'docs/**' - pull_request: - -jobs: - mac_tsan_mbedtls: - runs-on: macOS-latest - steps: - - uses: actions/checkout@v1 - - uses: seanmiddleditch/gha-setup-ninja@master - - name: install mbedtls - run: brew install mbedtls - - name: make test - run: make -f makefile.dev test_tsan_mbedtls diff --git a/3rdparty/ixwebsocket/.github/workflows/unittest_mac_tsan_openssl.yml b/3rdparty/ixwebsocket/.github/workflows/unittest_mac_tsan_openssl.yml deleted file mode 100644 index ddc9c7d..0000000 --- a/3rdparty/ixwebsocket/.github/workflows/unittest_mac_tsan_openssl.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: mac_tsan_openssl -on: - push: - paths-ignore: - - 'docs/**' - pull_request: - -jobs: - mac_tsan_openssl: - runs-on: macOS-latest - steps: - - uses: actions/checkout@v1 - - uses: seanmiddleditch/gha-setup-ninja@master - - name: install openssl - run: brew install openssl@1.1 - - name: make test - run: make -f makefile.dev test_tsan_openssl diff --git a/3rdparty/ixwebsocket/.github/workflows/unittest_mac_tsan_sectransport.yml b/3rdparty/ixwebsocket/.github/workflows/unittest_mac_tsan_sectransport.yml deleted file mode 100644 index 739c0c4..0000000 --- a/3rdparty/ixwebsocket/.github/workflows/unittest_mac_tsan_sectransport.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: mac_tsan_sectransport -on: - push: - paths-ignore: - - 'docs/**' - pull_request: - -jobs: - mac_tsan_sectransport: - runs-on: macOS-latest - steps: - - uses: actions/checkout@v1 - - uses: seanmiddleditch/gha-setup-ninja@master - - name: make test_tsan_sectransport - run: make -f makefile.dev test_tsan_sectransport diff --git a/3rdparty/ixwebsocket/.github/workflows/unittest_uwp.yml b/3rdparty/ixwebsocket/.github/workflows/unittest_uwp.yml deleted file mode 100644 index a721e30..0000000 --- a/3rdparty/ixwebsocket/.github/workflows/unittest_uwp.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: uwp -on: - push: - paths-ignore: - - 'docs/**' - pull_request: - -jobs: - uwp: - runs-on: windows-latest - steps: - - uses: actions/checkout@v1 - - uses: seanmiddleditch/gha-setup-vsdevenv@master - - uses: seanmiddleditch/gha-setup-ninja@master - - run: | - mkdir build - cd build - cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0" -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_C_COMPILER=cl.exe -DUSE_TEST=1 -DUSE_ZLIB=0 .. - - run: | - cd build - ninja - - run: | - cd build - ninja test - -# -# Windows with OpenSSL is working but disabled as it takes 13 minutes (10 for openssl) to build with vcpkg -# -# windows_openssl: -# runs-on: windows-latest -# steps: -# - uses: actions/checkout@v1 -# - uses: seanmiddleditch/gha-setup-vsdevenv@master -# - run: | -# vcpkg install zlib:x64-windows -# vcpkg install openssl:x64-windows -# - run: | -# mkdir build -# cd build -# cmake -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_CXX_COMPILER=cl.exe -DUSE_OPEN_SSL=1 -DUSE_TLS=1 -DUSE_WS=1 -DUSE_TEST=1 .. -# - run: cmake --build build -# -# # Running the unittest does not work, the binary cannot be found -# #- run: ../build/test/ixwebsocket_unittest.exe -# # working-directory: test diff --git a/3rdparty/ixwebsocket/.github/workflows/unittest_windows_gcc.yml b/3rdparty/ixwebsocket/.github/workflows/unittest_windows_gcc.yml deleted file mode 100644 index 4908ae1..0000000 --- a/3rdparty/ixwebsocket/.github/workflows/unittest_windows_gcc.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: windows_gcc -on: - push: - paths-ignore: - - 'docs/**' - pull_request: - -jobs: - windows: - runs-on: windows-latest - steps: - - uses: actions/checkout@v1 - - uses: seanmiddleditch/gha-setup-ninja@master - - uses: bsergean/setup-mingw@d79ce405bac9edef3a1726ef00554a56f0bafe66 - - run: | - mkdir build - cd build - cmake -GNinja -DCMAKE_CXX_COMPILER=c++ -DCMAKE_C_COMPILER=cc -DUSE_WS=1 -DUSE_TEST=1 -DUSE_ZLIB=0 -DCMAKE_UNITY_BUILD=ON .. - - run: | - cd build - ninja - - run: | - cd build - ctest -V - # ninja test - -#- run: ../build/test/ixwebsocket_unittest.exe -# working-directory: test diff --git a/3rdparty/ixwebsocket/.gitignore b/3rdparty/ixwebsocket/.gitignore deleted file mode 100644 index 36e9925..0000000 --- a/3rdparty/ixwebsocket/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -build -*.pyc -venv -ixsnake/ixsnake/.certs/ -site/ -ws/.certs/ -ws/.srl -ixhttpd -makefile -a.out -.idea/ -cmake-build-debug/ diff --git a/3rdparty/ixwebsocket/.pre-commit-config.yaml b/3rdparty/ixwebsocket/.pre-commit-config.yaml deleted file mode 100644 index de81d1b..0000000 --- a/3rdparty/ixwebsocket/.pre-commit-config.yaml +++ /dev/null @@ -1,12 +0,0 @@ -repos: -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.5.0 - hooks: - - id: check-yaml - - id: end-of-file-fixer - - id: trailing-whitespace -- repo: https://github.com/pocc/pre-commit-hooks - rev: v1.1.1 - hooks: - - id: clang-format - args: [-i, -style=file] diff --git a/3rdparty/ixwebsocket/Dockerfile b/3rdparty/ixwebsocket/Dockerfile deleted file mode 120000 index 197ac83..0000000 --- a/3rdparty/ixwebsocket/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -docker/Dockerfile.alpine \ No newline at end of file diff --git a/3rdparty/ixwebsocket/README.md b/3rdparty/ixwebsocket/README.md deleted file mode 100644 index f78bf9f..0000000 --- a/3rdparty/ixwebsocket/README.md +++ /dev/null @@ -1,152 +0,0 @@ -## Hello world - -(note from the main developer, sadly I don't have too much time to devote to this library anymore, maybe it's time to pass the maintenance to someone else more motivated ?) - -IXWebSocket is a C++ library for WebSocket client and server development. It has minimal dependencies (no boost), is very simple to use and support everything you'll likely need for websocket dev (SSL, deflate compression, compiles on most platforms, etc...). HTTP client and server code is also available, but it hasn't received as much testing. - -It is been used on big mobile video game titles sending and receiving tons of messages since 2017 (iOS and Android). It was tested on macOS, iOS, Linux, Android, Windows and FreeBSD. Two important design goals are simplicity and correctness. - -```cpp -/* - * main.cpp - * Author: Benjamin Sergeant - * Copyright (c) 2020 Machine Zone, Inc. All rights reserved. - * - * Super simple standalone example. See ws folder, unittest and doc/usage.md for more. - * - * On macOS - * $ mkdir -p build ; (cd build ; cmake -DUSE_TLS=1 .. ; make -j ; make install) - * $ clang++ --std=c++11 --stdlib=libc++ main.cpp -lixwebsocket -lz -framework Security -framework Foundation - * $ ./a.out - * - * Or use cmake -DBUILD_DEMO=ON option for other platforms - */ - -#include -#include -#include -#include - -int main() -{ - // Required on Windows - ix::initNetSystem(); - - // Our websocket object - ix::WebSocket webSocket; - - // Connect to a server with encryption - // See https://machinezone.github.io/IXWebSocket/usage/#tls-support-and-configuration - // https://github.com/machinezone/IXWebSocket/issues/386#issuecomment-1105235227 (self signed certificates) - std::string url("wss://echo.websocket.org"); - webSocket.setUrl(url); - - std::cout << "Connecting to " << url << "..." << std::endl; - - // Setup a callback to be fired (in a background thread, watch out for race conditions !) - // when a message or an event (open, close, error) is received - webSocket.setOnMessageCallback([](const ix::WebSocketMessagePtr& msg) - { - if (msg->type == ix::WebSocketMessageType::Message) - { - std::cout << "received message: " << msg->str << std::endl; - std::cout << "> " << std::flush; - } - else if (msg->type == ix::WebSocketMessageType::Open) - { - std::cout << "Connection established" << std::endl; - std::cout << "> " << std::flush; - } - else if (msg->type == ix::WebSocketMessageType::Error) - { - // Maybe SSL is not configured properly - std::cout << "Connection error: " << msg->errorInfo.reason << std::endl; - std::cout << "> " << std::flush; - } - } - ); - - // Now that our callback is setup, we can start our background thread and receive messages - webSocket.start(); - - // Send a message to the server (default to TEXT mode) - webSocket.send("hello world"); - - // Display a prompt - std::cout << "> " << std::flush; - - std::string text; - // Read text from the console and send messages in text mode. - // Exit with Ctrl-D on Unix or Ctrl-Z on Windows. - while (std::getline(std::cin, text)) - { - webSocket.send(text); - std::cout << "> " << std::flush; - } - - return 0; -} -``` - -Interested? Go read the [docs](https://machinezone.github.io/IXWebSocket/)! If things don't work as expected, please create an issue on GitHub, or even better a pull request if you know how to fix your problem. - -IXWebSocket is actively being developed, check out the [changelog](https://machinezone.github.io/IXWebSocket/CHANGELOG/) to know what's cooking. If you are looking for a real time messaging service (the chat-like 'server' your websocket code will talk to) with many features such as history, backed by Redis, look at [cobra](https://github.com/machinezone/cobra). - -IXWebSocket client code is autobahn compliant beginning with the 6.0.0 version. See the current [test results](https://bsergean.github.io/autobahn/reports/clients/index.html). Some tests are still failing in the server code. - -Starting with the 11.0.8 release, IXWebSocket should be fully C++11 compatible. - -## Users - -If your company or project is using this library, feel free to open an issue or PR to amend this list. - -- [Machine Zone](https://www.mz.com) -- [Tokio](https://github.com/liz3/tokio), a discord library focused on audio playback with node bindings. -- [libDiscordBot](https://github.com/tostc/libDiscordBot/tree/master), an easy to use Discord-bot framework. -- [gwebsocket](https://github.com/norrbotten/gwebsocket), a websocket (lua) module for Garry's Mod -- [DisCPP](https://github.com/DisCPP/DisCPP), a simple but feature rich Discord API wrapper (archived as of Oct 8, 2021) -- [discord.cpp](https://github.com/luccanunes/discord.cpp), a discord library for making bots -- [Teleport](http://teleportconnect.com/), Teleport is your own personal remote robot avatar -- [Abaddon](https://github.com/uowuo/abaddon), An alternative Discord client made with C++/gtkmm -- [NovaCoin](https://github.com/novacoin-project/novacoin), a hybrid scrypt PoW + PoS based cryptocurrency. -- [Candy](https://github.com/lanthora/candy), A WebSocket and TUN based VPN for Linux -- [ITGmania](https://github.com/itgmania/itgmania), a cross platform Dance Dance Revolution-like emulator. - -## Alternative libraries - -There are plenty of great websocket libraries out there, which might work for you. Here are a couple of serious ones. - -* [websocketpp](https://github.com/zaphoyd/websocketpp) - C++ -* [beast](https://github.com/boostorg/beast) - C++ -* [µWebSockets](https://github.com/uNetworking/uWebSockets) - C++ -* [libwebsockets](https://libwebsockets.org/) - C -* [wslay](https://github.com/tatsuhiro-t/wslay) - C - -[uvweb](https://github.com/bsergean/uvweb) is a library written by the IXWebSocket author which is built on top of [uvw](https://github.com/skypjack/uvw), which is a C++ wrapper for [libuv](https://libuv.org/). It has more dependencies and does not support SSL at this point, but it can be used to open multiple connections within a single OS thread thanks to libuv. - -To check the performance of a websocket library, you can look at the [autoroute](https://github.com/bsergean/autoroute) project. - -## Continuous Integration - -| OS | TLS | Sanitizer | Status | -|-------------------|-------------------|-------------------|-------------------| -| Linux | OpenSSL | None | [![Build2][1]][0] | -| macOS | Secure Transport | Thread Sanitizer | [![Build2][2]][0] | -| macOS | OpenSSL | Thread Sanitizer | [![Build2][3]][0] | -| macOS | MbedTLS | Thread Sanitizer | [![Build2][4]][0] | -| Windows | Disabled | None | [![Build2][5]][0] | -| UWP | Disabled | None | [![Build2][6]][0] | -| Linux | OpenSSL | Address Sanitizer | [![Build2][7]][0] | - -* Some tests are disabled on Windows/UWP because of a pathing problem -* TLS and ZLIB are disabled on Windows/UWP because enabling make the CI run takes a lot of time, for setting up vcpkg. - -[0]: https://github.com/machinezone/IXWebSocket -[1]: https://github.com/machinezone/IXWebSocket/workflows/linux/badge.svg -[2]: https://github.com/machinezone/IXWebSocket/workflows/mac_tsan_sectransport/badge.svg -[3]: https://github.com/machinezone/IXWebSocket/workflows/mac_tsan_openssl/badge.svg -[4]: https://github.com/machinezone/IXWebSocket/workflows/mac_tsan_mbedtls/badge.svg -[5]: https://github.com/machinezone/IXWebSocket/workflows/windows/badge.svg -[6]: https://github.com/machinezone/IXWebSocket/workflows/uwp/badge.svg -[7]: https://github.com/machinezone/IXWebSocket/workflows/linux_asan/badge.svg - diff --git a/3rdparty/ixwebsocket/SECURITY.md b/3rdparty/ixwebsocket/SECURITY.md deleted file mode 100644 index 81aecf1..0000000 --- a/3rdparty/ixwebsocket/SECURITY.md +++ /dev/null @@ -1,11 +0,0 @@ -# Security Policy - -## Supported Versions - -| Version | Supported | -| ------- | ------------------ | -| 7.x.x | :white_check_mark: | - -## Reporting a Vulnerability - -Users should send an email to bsergean@gmail.com to report a vulnerability. diff --git a/3rdparty/ixwebsocket/docker-compose.yml b/3rdparty/ixwebsocket/docker-compose.yml deleted file mode 100644 index 0caf0cb..0000000 --- a/3rdparty/ixwebsocket/docker-compose.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: "3.3" -services: - push: - entrypoint: ws push_server --host 0.0.0.0 - image: ${DOCKER_REPO}/ws:build - - autoroute: - entrypoint: ws autoroute ws://push:8008 - image: ${DOCKER_REPO}/ws:build - depends_on: - - push diff --git a/3rdparty/ixwebsocket/docker/Dockerfile.alpine b/3rdparty/ixwebsocket/docker/Dockerfile.alpine deleted file mode 100644 index e42528f..0000000 --- a/3rdparty/ixwebsocket/docker/Dockerfile.alpine +++ /dev/null @@ -1,39 +0,0 @@ -FROM alpine:3.12 as build - -RUN apk add --no-cache \ - gcc g++ musl-dev linux-headers \ - cmake mbedtls-dev make zlib-dev python3-dev ninja git - -RUN addgroup -S app && \ - adduser -S -G app app && \ - chown -R app:app /opt && \ - chown -R app:app /usr/local - -# There is a bug in CMake where we cannot build from the root top folder -# So we build from /opt -COPY --chown=app:app . /opt -WORKDIR /opt - -USER app -RUN make -f makefile.dev ws_mbedtls_install && \ - sh tools/trim_repo_for_docker.sh - -FROM alpine:3.12 as runtime - -RUN apk add --no-cache libstdc++ mbedtls ca-certificates python3 strace && \ - addgroup -S app && \ - adduser -S -G app app - -COPY --chown=app:app --from=build /usr/local/bin/ws /usr/local/bin/ws - -# COPY --chown=app:app --from=build /opt /opt - -RUN chmod +x /usr/local/bin/ws && \ - ldd /usr/local/bin/ws - -# Now run in usermode -USER app -WORKDIR /home/app - -ENTRYPOINT ["ws"] -EXPOSE 8008 diff --git a/3rdparty/ixwebsocket/docker/Dockerfile.centos b/3rdparty/ixwebsocket/docker/Dockerfile.centos deleted file mode 100644 index 06757cf..0000000 --- a/3rdparty/ixwebsocket/docker/Dockerfile.centos +++ /dev/null @@ -1,41 +0,0 @@ -FROM centos:8 as build - -RUN yum install -y gcc-c++ make cmake zlib-devel openssl-devel redhat-rpm-config - -RUN yum install -y epel-release -RUN yum install -y mbedtls-devel - -RUN groupadd app && useradd -g app app -RUN chown -R app:app /opt -RUN chown -R app:app /usr/local - -# There is a bug in CMake where we cannot build from the root top folder -# So we build from /opt -COPY --chown=app:app . /opt -WORKDIR /opt - -USER app -RUN [ "make", "ws_mbedtls_install" ] -RUN [ "rm", "-rf", "build" ] - -FROM centos:8 as runtime - -RUN yum install -y gdb strace - -RUN yum install -y epel-release -RUN yum install -y mbedtls - -RUN groupadd app && useradd -g app app -COPY --chown=app:app --from=build /usr/local/bin/ws /usr/local/bin/ws -RUN chmod +x /usr/local/bin/ws -RUN ldd /usr/local/bin/ws - -# Copy source code for gcc -COPY --chown=app:app --from=build /opt /opt - -# Now run in usermode -USER app -WORKDIR /home/app - -ENTRYPOINT ["ws"] -EXPOSE 8008 diff --git a/3rdparty/ixwebsocket/docker/Dockerfile.centos7 b/3rdparty/ixwebsocket/docker/Dockerfile.centos7 deleted file mode 100644 index adf5c65..0000000 --- a/3rdparty/ixwebsocket/docker/Dockerfile.centos7 +++ /dev/null @@ -1,26 +0,0 @@ -FROM centos:7 as build - -RUN yum install -y gcc-c++ make zlib-devel openssl-devel redhat-rpm-config - -RUN groupadd app && useradd -g app app -RUN chown -R app:app /opt -RUN chown -R app:app /usr/local - -WORKDIR /tmp -RUN curl -O https://cmake.org/files/v3.14/cmake-3.14.0-Linux-x86_64.tar.gz -RUN tar zxvf cmake-3.14.0-Linux-x86_64.tar.gz -RUN cp -rf cmake-3.14.0-Linux-x86_64/* /usr/ - -RUN yum install -y git - -# There is a bug in CMake where we cannot build from the root top folder -# So we build from /opt -COPY --chown=app:app . /opt -WORKDIR /opt - -USER app -RUN [ "make", "ws_no_python" ] -RUN [ "rm", "-rf", "build" ] - -ENTRYPOINT ["ws"] -CMD ["--help"] diff --git a/3rdparty/ixwebsocket/docker/Dockerfile.debian b/3rdparty/ixwebsocket/docker/Dockerfile.debian deleted file mode 100644 index 9e885e5..0000000 --- a/3rdparty/ixwebsocket/docker/Dockerfile.debian +++ /dev/null @@ -1,52 +0,0 @@ -# Build time -FROM debian:buster as build - -ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update -RUN apt-get -y install wget -RUN mkdir -p /tmp/cmake -WORKDIR /tmp/cmake -RUN wget https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.tar.gz -RUN tar zxf cmake-3.14.0-Linux-x86_64.tar.gz - -RUN apt-get -y install g++ -RUN apt-get -y install libssl-dev -RUN apt-get -y install libz-dev -RUN apt-get -y install make - -COPY . . - -ARG CMAKE_BIN_PATH=/tmp/cmake/cmake-3.14.0-Linux-x86_64/bin -ENV PATH="${CMAKE_BIN_PATH}:${PATH}" - -RUN ["make"] - -# Runtime -FROM debian:buster as runtime - -ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update -# Runtime -RUN apt-get install -y libssl1.1 -RUN apt-get install -y ca-certificates -RUN ["update-ca-certificates"] - -# Debugging -RUN apt-get install -y strace -RUN apt-get install -y procps -RUN apt-get install -y htop - -RUN adduser --disabled-password --gecos '' app -COPY --chown=app:app --from=build /usr/local/bin/ws /usr/local/bin/ws -RUN chmod +x /usr/local/bin/ws -RUN ldd /usr/local/bin/ws - -# Now run in usermode -USER app -WORKDIR /home/app - -COPY --chown=app:app ws/snake/appsConfig.json . -COPY --chown=app:app ws/cobraMetricsSample.json . - -ENTRYPOINT ["ws"] -CMD ["--help"] diff --git a/3rdparty/ixwebsocket/docker/Dockerfile.fedora b/3rdparty/ixwebsocket/docker/Dockerfile.fedora deleted file mode 100644 index d1966fc..0000000 --- a/3rdparty/ixwebsocket/docker/Dockerfile.fedora +++ /dev/null @@ -1,43 +0,0 @@ -FROM fedora:30 as build - -RUN yum install -y gcc-g++ -RUN yum install -y cmake -RUN yum install -y make -RUN yum install -y openssl-devel - -RUN yum install -y wget -RUN mkdir -p /tmp/cmake -WORKDIR /tmp/cmake -RUN wget https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.tar.gz -RUN tar zxf cmake-3.14.0-Linux-x86_64.tar.gz - -ARG CMAKE_BIN_PATH=/tmp/cmake/cmake-3.14.0-Linux-x86_64/bin -ENV PATH="${CMAKE_BIN_PATH}:${PATH}" - -RUN yum install -y python -RUN yum install -y libtsan -RUN yum install -y zlib-devel - -COPY . . -# RUN ["make", "test"] -RUN ["make"] - -# Runtime -FROM fedora:30 as runtime - -RUN yum install -y libtsan - -RUN groupadd app && useradd -g app app -COPY --chown=app:app --from=build /usr/local/bin/ws /usr/local/bin/ws -RUN chmod +x /usr/local/bin/ws -RUN ldd /usr/local/bin/ws - -# Now run in usermode -USER app -WORKDIR /home/app - -COPY --chown=app:app ws/snake/appsConfig.json . -COPY --chown=app:app ws/cobraMetricsSample.json . - -ENTRYPOINT ["ws"] -CMD ["--help"] diff --git a/3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_bionic b/3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_bionic deleted file mode 100644 index 2822107..0000000 --- a/3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_bionic +++ /dev/null @@ -1,23 +0,0 @@ -# Build time -FROM ubuntu:bionic as build - -ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update -RUN apt-get -y install wget -RUN mkdir -p /tmp/cmake -WORKDIR /tmp/cmake -RUN wget https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.tar.gz -RUN tar zxf cmake-3.14.0-Linux-x86_64.tar.gz - -RUN apt-get -y install g++ -RUN apt-get -y install libssl-dev -RUN apt-get -y install libz-dev -RUN apt-get -y install make -RUN apt-get -y install python - -COPY . . - -ARG CMAKE_BIN_PATH=/tmp/cmake/cmake-3.14.0-Linux-x86_64/bin -ENV PATH="${CMAKE_BIN_PATH}:${PATH}" - -RUN ["make", "ws"] diff --git a/3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_disco b/3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_disco deleted file mode 100644 index c60230a..0000000 --- a/3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_disco +++ /dev/null @@ -1,24 +0,0 @@ -# Build time -FROM ubuntu:disco as build - -ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update -RUN apt-get -y install wget -RUN mkdir -p /tmp/cmake -WORKDIR /tmp/cmake -RUN wget https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.tar.gz -RUN tar zxf cmake-3.14.0-Linux-x86_64.tar.gz - -RUN apt-get -y install g++ -RUN apt-get -y install libssl-dev -RUN apt-get -y install libz-dev -RUN apt-get -y install make -RUN apt-get -y install python - -COPY . . - -ARG CMAKE_BIN_PATH=/tmp/cmake/cmake-3.14.0-Linux-x86_64/bin -ENV PATH="${CMAKE_BIN_PATH}:${PATH}" - -# RUN ["make", "test"] -CMD ["sh"] diff --git a/3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_groovy b/3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_groovy deleted file mode 100644 index a5e45a1..0000000 --- a/3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_groovy +++ /dev/null @@ -1,23 +0,0 @@ -# Build time -FROM ubuntu:groovy as build - -ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update - -RUN apt-get -y install g++ libssl-dev libz-dev make python ninja-build -RUN apt-get -y install cmake -RUN apt-get -y install gdb - -COPY . /opt -WORKDIR /opt - -# -# To use the container interactively for debugging/building -# 1. Build with -# CMD ["ls"] -# 2. Run with -# docker run --entrypoint sh -it docker-game-eng-dev.addsrv.com/ws:9.10.6 -# - -RUN ["make", "test"] -# CMD ["ls"] diff --git a/3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_precise b/3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_precise deleted file mode 100644 index da72e6d..0000000 --- a/3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_precise +++ /dev/null @@ -1,27 +0,0 @@ -# Build time -FROM ubuntu:precise as build - -ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update -RUN apt-get -y install wget -RUN mkdir -p /tmp/cmake -WORKDIR /tmp/cmake -RUN wget --no-check-certificate https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.tar.gz -RUN tar zxf cmake-3.14.0-Linux-x86_64.tar.gz - -RUN apt-get -y install g++ -RUN apt-get -y install libssl-dev -RUN apt-get -y install libz-dev -RUN apt-get -y install make -RUN apt-get -y install python -RUN apt-get -y install git - -COPY . . - -ARG CMAKE_BIN_PATH=/tmp/cmake/cmake-3.14.0-Linux-x86_64/bin -ENV PATH="${CMAKE_BIN_PATH}:${PATH}" - -RUN ["make", "ws_no_python"] - -ENTRYPOINT ["ws"] -CMD ["--help"] diff --git a/3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_trusty b/3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_trusty deleted file mode 100644 index a0701e1..0000000 --- a/3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_trusty +++ /dev/null @@ -1,22 +0,0 @@ -# Build time -FROM ubuntu:trusty as build - -ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update -RUN apt-get -y install wget -RUN mkdir -p /tmp/cmake -WORKDIR /tmp/cmake -RUN wget --no-check-certificate https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.tar.gz -RUN tar zxf cmake-3.14.0-Linux-x86_64.tar.gz - -RUN apt-get -y install g++ libssl-dev libz-dev make python git - -COPY . . - -ARG CMAKE_BIN_PATH=/tmp/cmake/cmake-3.14.0-Linux-x86_64/bin -ENV PATH="${CMAKE_BIN_PATH}:${PATH}" - -RUN ["make", "ws_no_python"] - -ENTRYPOINT ["ws"] -CMD ["--help"] diff --git a/3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_xenial b/3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_xenial deleted file mode 100644 index f13652d..0000000 --- a/3rdparty/ixwebsocket/docker/Dockerfile.ubuntu_xenial +++ /dev/null @@ -1,24 +0,0 @@ -# Build time -FROM ubuntu:xenial as build - -ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update -RUN apt-get -y install wget -RUN mkdir -p /tmp/cmake -WORKDIR /tmp/cmake -RUN wget https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.tar.gz -RUN tar zxf cmake-3.14.0-Linux-x86_64.tar.gz - -RUN apt-get -y install g++ -RUN apt-get -y install libssl-dev -RUN apt-get -y install libz-dev -RUN apt-get -y install make -RUN apt-get -y install python - -COPY . . - -ARG CMAKE_BIN_PATH=/tmp/cmake/cmake-3.14.0-Linux-x86_64/bin -ENV PATH="${CMAKE_BIN_PATH}:${PATH}" - -# RUN ["make"] -RUN ["make", "test"] diff --git a/3rdparty/ixwebsocket/docs/CHANGELOG.md b/3rdparty/ixwebsocket/docs/CHANGELOG.md deleted file mode 100644 index d079865..0000000 --- a/3rdparty/ixwebsocket/docs/CHANGELOG.md +++ /dev/null @@ -1,1237 +0,0 @@ -# Changelog - -All changes to this project will be documented in this file. - -## [11.4.5] - 2024-06-05 - -New changes are documented in the Release page in the GitHub repository. - -## [11.4.4] - 2023-06-05 - -## [11.4.3] - 2022-05-13 - -Set shorter thread names -BoringSSL fix with SNI -Websocket computed header is valid Base64 - -## [11.4.1] - 2022-04-23 - -vckpg + cmake fix, to handle zlib as a dependency better - -## [11.4.0] - 2022-01-05 - -(Windows) Use wsa select event, which should lead to a much better behavior on Windows in general, and also when sending large payloads (#342) -Fix "HTTP/1.1 400 Illegal character CNTL=0xf" caused by serverMaxWindowBits/clientMaxWindowBits being uint8_t (signed char). (#341) -Export symbols into .def files -Export symbols into .def files on MSVC (#339) -Include to provide standard error constants (#338) -Improved compatibility - fix mingw crossbuild (#337) -Allow to cancel asynchronous HTTP requests (#332) -Fix errors in example code. (#336) - -## [11.3.2] - 2021-11-24 - -(server) Add getters for basic Servers properties (like port, host, etc...) (#327) + fix one compiler warning - -## [11.3.1] - 2021-10-22 - -(library/cmake) Compatible with MbedTLS 3 + fix a bug on Windows where the incorrect remote port is computed (#320) - -## [11.3.0] - 2021-09-20 - -(library/cmake) Only find OpenSSL, MbedTLS, zlib if they have not already been found, make CMake install optional (#317) + Use GNUInstallDirs in cmake (#318) - -## [11.2.10] - 2021-07-27 - -(ws) bump CLI command line parsing library from 1.8 to 2.0 - -## [11.2.9] - 2021-06-08 - -(ws) ws connect has a -g option to gzip decompress messages for API such as the websocket Huobi Global. - -## [11.2.8] - 2021-06-03 - -(websocket client + server) WebSocketMessage class tweak to fix unsafe patterns - -## [11.2.7] - 2021-05-27 - -(websocket server) Handle and accept firefox browser special upgrade value (keep-alive, Upgrade) - -## [11.2.6] - 2021-05-18 - -(Windows) move EINVAL (re)definition from IXSocket.h to IXNetSystem.h (fix #289) - -## [11.2.5] - 2021-04-04 - -(http client) DEL is not an HTTP method name, but DELETE is - -## [11.2.4] - 2021-03-25 - -(cmake) install IXUniquePtr.h - -## [11.2.3] - 2021-03-24 - -(ssl + windows) missing include for CertOpenStore function - -## [11.2.2] - 2021-03-23 - -(ixwebsocket) version bump - -## [11.2.1] - 2021-03-23 - -(ixwebsocket) version bump - -## [11.2.0] - 2021-03-23 - -(ixwebsocket) correct mingw support (gcc on windows) - -## [11.1.4] - 2021-03-23 - -(ixwebsocket) add getMinWaitBetweenReconnectionRetries - -## [11.1.3] - 2021-03-23 - -(ixwebsocket) New option to set the min wait between reconnection attempts. Still default to 1ms. (setMinWaitBetweenReconnectionRetries). - -## [11.1.2] - 2021-03-22 - -(ws) initialize maxWaitBetweenReconnectionRetries to a non zero value ; a zero value was causing spurious reconnections attempts - -## [11.1.1] - 2021-03-20 - -(cmake) Library can be built as a static or a dynamic library, controlled with BUILD_SHARED_LIBS. Default to static library - -## [11.1.0] - 2021-03-16 - -(ixwebsocket) Use LEAN_AND_MEAN Windows define to help with undefined link error when building a DLL. Support websocket server disablePerMessageDeflate option correctly. - -## [11.0.9] - 2021-03-07 - -(ixwebsocket) Expose setHandshakeTimeout method - -## [11.0.8] - 2020-12-25 - -(ws) trim ws dependencies no more ixcrypto and ixcore deps - -## [11.0.7] - 2020-12-25 - -(ws) trim ws dependencies, only depends on ixcrypto and ixcore - -## [11.0.6] - 2020-12-22 - -(build) rename makefile to makefile.dev to ease cmake BuildExternal (fix #261) - -## [11.0.5] - 2020-12-17 - -(ws) Implement simple header based websocket authorization technique to reject -client which do not supply a certain header ("Authorization") with a special -value (see doc). - -## [11.0.4] - 2020-11-16 - -(ixwebsocket) Handle EINTR return code in ix::poll and IXSelectInterrupt - -## [11.0.3] - 2020-11-16 - -(ixwebsocket) Fix #252 / regression in 11.0.2 with string comparisons - -## [11.0.2] - 2020-11-15 - -(ixwebsocket) use a C++11 compatible make_unique shim - -## [11.0.1] - 2020-11-11 - -(socket) replace a std::vector with an std::array used as a tmp buffer in Socket::readBytes - -## [11.0.0] - 2020-11-11 - -(openssl security fix) in the client to server connection, peer verification is not done in all cases. See https://github.com/machinezone/IXWebSocket/pull/250 - -## [10.5.7] - 2020-11-07 - -(docker) build docker container with zlib disabled - -## [10.5.6] - 2020-11-07 - -(cmake) DEFLATE -> Deflate in CMake to stop warnings about casing - -## [10.5.5] - 2020-11-07 - -(ws autoroute) Display result in compliant way (AUTOROUTE IXWebSocket :: N ms) so that result can be parsed easily - -## [10.5.4] - 2020-10-30 - -(ws gunzip + IXGZipCodec) Can decompress gziped data with libdeflate. ws gunzip computed output filename was incorrect (was the extension aka gz) instead of the file without the extension. Also check whether the output file is writeable. - -## [10.5.3] - 2020-10-19 - -(http code) With zlib disabled, some code should not be reached - -## [10.5.2] - 2020-10-12 - -(ws curl) Add support for --data-binary option, to set the request body. When present the request will be sent with the POST verb - -## [10.5.1] - 2020-10-09 - -(http client + server + ws) Add support for compressing http client requests with gzip. --compress_request argument is used in ws to enable this. The Content-Encoding is set to gzip, and decoded on the server side if present. - -## [10.5.0] - 2020-09-30 - -(http client + server + ws) Add support for uploading files with ws -F foo=@filename, new -D http server option to debug incoming client requests, internal api changed for http POST, PUT and PATCH to supply an HttpFormDataParameters - -## [10.4.9] - 2020-09-30 - -(http server + utility code) Add support for doing gzip compression with libdeflate library, if available - -## [10.4.8] - 2020-09-30 - -(cmake) Stop using FetchContent cmake module to retrieve jsoncpp third party dependency - -## [10.4.7] - 2020-09-28 - -(ws) add gzip and gunzip ws sub commands - -## [10.4.6] - 2020-09-26 - -(cmake) use FetchContent cmake module to retrieve jsoncpp third party dependency - -## [10.4.5] - 2020-09-26 - -(cmake) use FetchContent cmake module to retrieve spdlog third party dependency - -## [10.4.4] - 2020-09-22 - -(cobra connection) retrieve cobra server connection id from the cobra handshake message and display it in ws clients, metrics publisher and bots - -## [10.4.3] - 2020-09-22 - -(cobra 2 cobra) specify as an HTTP header which channel we will republish to - -## [10.4.2] - 2020-09-18 - -(cobra bots) change an error log to a warning log when reconnecting because no messages were received for a minute - -## [10.4.1] - 2020-09-18 - -(cobra connection and bots) set an HTTP header when connecting to help with debugging bots - -## [10.4.0] - 2020-09-12 - -(http server) read body request when the Content-Length is specified + set timeout to read the request to 30 seconds max by default, and make it configurable as a constructor parameter - -## [10.3.5] - 2020-09-09 - -(ws) autoroute command exit on its own once all messages have been received - -## [10.3.4] - 2020-09-04 - -(docker) ws docker file installs strace - -## [10.3.3] - 2020-09-02 - -(ws) echo_client command renamed to autoroute. Command exit once the server close the connection. push_server commands exit once N messages have been sent. - -## [10.3.2] - 2020-08-31 - -(ws + cobra bots) add a cobra_to_cobra ws subcommand to subscribe to a channel and republish received events to a different channel - -## [10.3.1] - 2020-08-28 - -(socket servers) merge the ConnectionInfo class with the ConnectionState one, which simplify all the server apis - -## [10.3.0] - 2020-08-26 - -(ws) set the main thread name, to help with debugging in XCode, gdb, lldb etc... - -## [10.2.9] - 2020-08-19 - -(ws) cobra to python bot / take a module python name as argument foo.bar.baz instead of a path foo/bar/baz.py - -## [10.2.8] - 2020-08-19 - -(ws) on Linux with mbedtls, when the system ca certs are specified (the default) pick up sensible OS supplied paths (tested with CentOS and Alpine) - -## [10.2.7] - 2020-08-18 - -(ws push_server) on the server side, stop sending and close the connection when the remote end has disconnected - -## [10.2.6] - 2020-08-17 - -(ixwebsocket) replace std::unique_ptr with std::array for some fixed arrays (which are in C++11) - -## [10.2.5] - 2020-08-15 - -(ws) merge all ws_*.cpp files into a single one to speedup compilation - -## [10.2.4] - 2020-08-15 - -(socket server) in the loop accepting connections, call select without a timeout on unix to avoid busy looping, and only wake up when a new connection happens - -## [10.2.3] - 2020-08-15 - -(socket server) instead of busy looping with a sleep, only wake up the GC thread when a new thread will have to be joined, (we know that thanks to the ConnectionState OnSetTerminated callback - -## [10.2.2] - 2020-08-15 - -(socket server) add a callback to the ConnectionState to be invoked when the connection is terminated. This will be used by the SocketServer in the future to know on time that the associated connection thread can be terminated. - -## [10.2.1] - 2020-08-15 - -(socket server) do not create a select interrupt object everytime when polling for notifications while waiting for new connections, instead use a persistent one which is a member variable - -## [10.2.0] - 2020-08-14 - -(ixwebsocket client) handle HTTP redirects - -## [10.2.0] - 2020-08-13 - -(ws) upgrade to latest version of nlohmann json (3.9.1 from 3.2.0) - -## [10.1.9] - 2020-08-13 - -(websocket proxy server) add ability to map different hosts to different websocket servers, using a json config file - -## [10.1.8] - 2020-08-12 - -(ws) on macOS, with OpenSSL or MbedTLS, use /etc/ssl/cert.pem as the system certs - -## [10.1.7] - 2020-08-11 - -(ws) -q option imply info log level, not warning log level - -## [10.1.6] - 2020-08-06 - -(websocket server) Handle programmer error when the server callback is not registered properly (fix #227) - -## [10.1.5] - 2020-08-02 - -(ws) Add a new ws sub-command, push_server. This command runs a server which sends many messages in a loop to a websocket client. We can receive above 200,000 messages per second (cf #235). - -## [10.1.4] - 2020-08-02 - -(ws) Add a new ws sub-command, echo_client. This command sends a message to an echo server, and send back to a server whatever message it does receive. When connecting to a local ws echo_server, on my MacBook Pro 2015 I can send/receive around 30,000 messages per second. (cf #235) - -## [10.1.3] - 2020-08-02 - -(ws) ws echo_server. Add a -q option to only enable warning and error log levels. This is useful for bench-marking so that we do not print a lot of things on the console. (cf #235) - -## [10.1.2] - 2020-07-31 - -(build) make using zlib optional, with the caveat that some http and websocket features are not available when zlib is absent - -## [10.1.1] - 2020-07-29 - -(websocket client) onProgressCallback not called for short messages on a websocket (fix #233) - -## [10.1.0] - 2020-07-29 - -(websocket client) heartbeat is not sent at the requested frequency (fix #232) - -## [10.0.3] - 2020-07-28 - -compiler warning fixes - -## [10.0.2] - 2020-07-28 - -(ixcobra) CobraConnection: unsubscribe from all subscriptions when disconnecting - -## [10.0.1] - 2020-07-27 - -(socket utility) move ix::getFreePort to ixwebsocket library - -## [10.0.0] - 2020-07-25 - -(ixwebsocket server) change legacy api with 2 nested callbacks, so that the first api takes a weak_ptr as its first argument - -## [9.10.7] - 2020-07-25 - -(ixwebsocket) add WebSocketProxyServer, from ws. Still need to make the interface better. - -## [9.10.6] - 2020-07-24 - -(ws) port broadcast_server sub-command to the new server API - -## [9.10.5] - 2020-07-24 - -(unittest) port most unittests to the new server API - -## [9.10.3] - 2020-07-24 - -(ws) port ws transfer to the new server API - -## [9.10.2] - 2020-07-24 - -(websocket client) reset WebSocketTransport onClose callback in the WebSocket destructor - -## [9.10.1] - 2020-07-24 - -(websocket server) reset client websocket callback when the connection is closed - -## [9.10.0] - 2020-07-23 - -(websocket server) add a new simpler API to handle client connections / that API does not trigger a memory leak while the previous one did - -## [9.9.3] - 2020-07-17 - -(build) merge platform specific files which were used to have different implementations for setting a thread name into a single file, to make it easier to include every source files and build the ixwebsocket library (fix #226) - -## [9.9.2] - 2020-07-10 - -(socket server) bump default max connection count from 32 to 128 - -## [9.9.1] - 2020-07-10 - -(snake) implement super simple stream sql expression support in snake server - -## [9.9.0] - 2020-07-08 - -(socket+websocket+http+redis+snake servers) expose the remote ip and remote port when a new connection is made - -## [9.8.6] - 2020-07-06 - -(cmake) change the way zlib and openssl are searched - -## [9.8.5] - 2020-07-06 - -(cobra python bots) remove the test which stop the bot when events do not follow cobra metrics system schema with an id and a device entry - -## [9.8.4] - 2020-06-26 - -(cobra bots) remove bots which is not required now that we can use Python extensions - -## [9.8.3] - 2020-06-25 - -(cmake) new python code is optional and enabled at cmake time with -DUSE_PYTHON=1 - -## [9.8.2] - 2020-06-24 - -(cobra bots) new cobra metrics bot to send data to statsd using Python for processing the message - -## [9.8.1] - 2020-06-19 - -(cobra metrics to statsd bot) fps slow frame info : do not include os name - -## [9.8.0] - 2020-06-19 - -(cobra metrics to statsd bot) send info about memory warnings - -## [9.7.9] - 2020-06-18 - -(http client) fix deadlock when following redirects - -## [9.7.8] - 2020-06-18 - -(cobra metrics to statsd bot) send info about net requests - -## [9.7.7] - 2020-06-17 - -(cobra client and bots) add batch_size subscription option for retrieving multiple messages at once - -## [9.7.6] - 2020-06-15 - -(websocket) WebSocketServer is not a final class, so that users can extend it (fix #215) - -## [9.7.5] - 2020-06-15 - -(cobra bots) minor aesthetic change, in how we display http headers with a : then space as key value separator instead of :: with no space - -## [9.7.4] - 2020-06-11 - -(cobra metrics to statsd bot) change from a statsd type of gauge to a timing one - -## [9.7.3] - 2020-06-11 - -(redis cobra bots) capture most used devices in a zset - -## [9.7.2] - 2020-06-11 - -(ws) add bare bone redis-cli like sub-command, with command line editing powered by libnoise - -## [9.7.1] - 2020-06-11 - -(redis cobra bots) ws cobra metrics to redis / hostname invalid parsing - -## [9.7.0] - 2020-06-11 - -(redis cobra bots) xadd with maxlen + fix bug in xadd client implementation and ws cobra metrics to redis command argument parsing - -## [9.6.9] - 2020-06-10 - -(redis cobra bots) update the cobra to redis bot to use the bot framework, and change it to report fps metrics into redis streams. - -## [9.6.6] - 2020-06-04 - -(statsd cobra bots) statsd improvement: prefix does not need a dot as a suffix, message size can be larger than 256 bytes, error handling was invalid, use core logger for logging instead of std::cerr - -## [9.6.5] - 2020-05-29 - -(http server) support gzip compression - -## [9.6.4] - 2020-05-20 - -(compiler fix) support clang 5 and earlier (contributed by @LunarWatcher) - -## [9.6.3] - 2020-05-18 - -(cmake) revert CMake changes to fix #203 and be able to use an external OpenSSL - -## [9.6.2] - 2020-05-17 - -(cmake) make install cmake files optional to not conflict with vcpkg - -## [9.6.1] - 2020-05-17 - -(windows + tls) mbedtls is the default windows tls backend + add ability to load system certificates with mbdetls on windows - -## [9.6.0] - 2020-05-12 - -(ixbots) add options to limit how many messages per minute should be processed - -## [9.5.9] - 2020-05-12 - -(ixbots) add new class to configure a bot to simplify passing options around - -## [9.5.8] - 2020-05-08 - -(openssl tls) (openssl < 1.1) logic inversion - crypto locking callback are not registered properly - -## [9.5.7] - 2020-05-08 - -(cmake) default TLS back to mbedtls on Windows Universal Platform - -## [9.5.6] - 2020-05-06 - -(cobra bots) add a --heartbeat_timeout option to specify when the bot should terminate because no events are received - -## [9.5.5] - 2020-05-06 - -(openssl tls) when OpenSSL is older than 1.1, register the crypto locking callback to be thread safe. Should fix lots of CI failures - -## [9.5.4] - 2020-05-04 - -(cobra bots) do not use a queue to store messages pending processing, let the bot handle queuing - -## [9.5.3] - 2020-04-29 - -(http client) better current request cancellation support when the HttpClient destructor is invoked (see #189) - -## [9.5.2] - 2020-04-27 - -(cmake) fix cmake broken tls option parsing - -## [9.5.1] - 2020-04-27 - -(http client) Set default values for most HttpRequestArgs struct members (fix #185) - -## [9.5.0] - 2020-04-25 - -(ssl) Default to OpenSSL on Windows, since it can load the system certificates by default - -## [9.4.1] - 2020-04-25 - -(header) Add a space between header name and header value since most http parsers expects it, although it it not required. Cf #184 and #155 - -## [9.4.0] - 2020-04-24 - -(ssl) Add support for supplying SSL CA from memory, for OpenSSL and MbedTLS backends - -## [9.3.3] - 2020-04-17 - -(ixbots) display sent/receive message, per seconds as accumulated - -## [9.3.2] - 2020-04-17 - -(ws) add a --logfile option to configure all logs to go to a file - -## [9.3.1] - 2020-04-16 - -(cobra bots) add a utility class to factor out the common bots features (heartbeat) and move all bots to used it + convert cobra_subscribe to be a bot and add a unittest for it - -## [9.3.0] - 2020-04-15 - -(websocket) add a positive number to the heartbeat message sent, incremented each time the heartbeat is sent - -## [9.2.9] - 2020-04-15 - -(ixcobra) change cobra event callback to use a struct instead of several objects, which is more flexible/extensible - -## [9.2.8] - 2020-04-15 - -(ixcobra) make CobraConnection_EventType an enum class (CobraEventType) - -## [9.2.7] - 2020-04-14 - -(ixsentry) add a library method to upload a payload directly to sentry - -## [9.2.6] - 2020-04-14 - -(ixcobra) snake server / handle invalid incoming json messages + cobra subscriber in fluentd mode insert a created_at timestamp entry - -## [9.2.5] - 2020-04-13 - -(websocket) WebSocketMessagePtr is a unique_ptr instead of a shared_ptr - -## [9.2.4] - 2020-04-13 - -(websocket) use persistent member variable as temp variables to encode/decode zlib messages in order to reduce transient allocations - -## [9.2.3] - 2020-04-13 - -(ws) add a --runtime option to ws cobra_subscribe to optionally limit how much time it will run - -## [9.2.2] - 2020-04-04 - -(third_party deps) fix #177, update bundled spdlog to 1.6.0 - -## [9.2.1] - 2020-04-04 - -(windows) when using OpenSSL, the system store is used to populate the cacert. No need to ship a cacert.pem file with your app. - -## [9.2.0] - 2020-04-04 - -(windows) ci: windows build with TLS (mbedtls) + verify that we can be build with OpenSSL - -## [9.1.9] - 2020-03-30 - -(cobra to statsd bot) add ability to extract a numerical value and send a timer event to statsd, with the --timer option - -## [9.1.8] - 2020-03-29 - -(cobra to statsd bot) bot init was missing + capture socket error - -## [9.1.7] - 2020-03-29 - -(cobra to statsd bot) add ability to extract a numerical value and send a gauge event to statsd, with the --gauge option - -## [9.1.6] - 2020-03-29 - -(ws cobra subscriber) use a Json::StreamWriter to write to std::cout, and save one std::string allocation for each message printed - -## [9.1.5] - 2020-03-29 - -(docker) trim down docker image (300M -> 12M) / binary built without symbol and size optimization, and source code not copied over - -## [9.1.4] - 2020-03-28 - -(jsoncpp) update bundled copy to version 1.9.3 (at sha 3beb37ea14aec1bdce1a6d542dc464d00f4a6cec) - -## [9.1.3] - 2020-03-27 - -(docker) alpine docker build with release with debug info, and bundle ca-certificates - -## [9.1.2] - 2020-03-26 - -(mac ssl) rename DarwinSSL -> SecureTransport (see this too -> https://github.com/curl/curl/issues/3733) - -## [9.1.1] - 2020-03-26 - -(websocket) fix data race accessing _socket object without mutex protection when calling wakeUpFromPoll in WebSocketTransport.cpp - -## [9.1.0] - 2020-03-26 - -(ixcobra) add explicit event types for handshake, authentication and subscription failure, and handle those by exiting in ws_cobra_subcribe and friends - -## [9.0.3] - 2020-03-24 - -(ws connect) display statistics about how much time it takes to stop the connection - -## [9.0.2] - 2020-03-24 - -(socket) works with unique_ptr instead of shared_ptr in many places - -## [9.0.1] - 2020-03-24 - -(socket) selectInterrupt member is an unique_ptr instead of being a shared_ptr - -## [9.0.0] - 2020-03-23 - -(websocket) reset per-message deflate codec everytime we connect to a server/client - -## [8.3.4] - 2020-03-23 - -(websocket) fix #167, a long standing issue with sending empty messages with per-message deflate extension (and hopefully other zlib bug) - -## [8.3.3] - 2020-03-22 - -(cobra to statsd) port to windows and add a unittest - -## [8.3.2] - 2020-03-20 - -(websocket+tls) fix hang in tls handshake which could lead to ANR, discovered through unittesting. - -## [8.3.1] - 2020-03-20 - -(cobra) CobraMetricsPublisher can be configure with an ix::CobraConfig + more unittest use SSL in server + client - -## [8.3.0] - 2020-03-18 - -(websocket) Simplify ping/pong based heartbeat implementation - -## [8.2.7] - 2020-03-17 - -(ws) ws connect gains a new option to set the interval at which to send pings -(ws) ws echo_server gains a new option (-p) to disable responding to pings with pongs - -``` -IXWebSocket$ ws connect --ping_interval 2 wss://echo.websocket.org -Type Ctrl-D to exit prompt... -Connecting to url: wss://echo.websocket.org -> ws_connect: connected -[2020-03-17 23:53:02.726] [info] Uri: / -[2020-03-17 23:53:02.726] [info] Headers: -[2020-03-17 23:53:02.727] [info] Connection: Upgrade -[2020-03-17 23:53:02.727] [info] Date: Wed, 18 Mar 2020 06:45:05 GMT -[2020-03-17 23:53:02.727] [info] Sec-WebSocket-Accept: 0gtqbxW0aVL/QI/ICpLFnRaiKgA= -[2020-03-17 23:53:02.727] [info] sec-websocket-extensions: -[2020-03-17 23:53:02.727] [info] Server: Kaazing Gateway -[2020-03-17 23:53:02.727] [info] Upgrade: websocket -[2020-03-17 23:53:04.894] [info] Received pong -[2020-03-17 23:53:06.859] [info] Received pong -[2020-03-17 23:53:08.881] [info] Received pong -[2020-03-17 23:53:10.848] [info] Received pong -[2020-03-17 23:53:12.898] [info] Received pong -[2020-03-17 23:53:14.865] [info] Received pong -[2020-03-17 23:53:16.890] [info] Received pong -[2020-03-17 23:53:18.853] [info] Received pong - -[2020-03-17 23:53:19.388] [info] -ws_connect: connection closed: code 1000 reason Normal closure - -[2020-03-17 23:53:19.502] [info] Received 208 bytes -[2020-03-17 23:53:19.502] [info] Sent 0 bytes -``` - -## [8.2.6] - 2020-03-16 - -(cobra to sentry bot + docker) default docker file uses mbedtls + ws cobra_to_sentry pass tls options to sentryClient. - -## [8.2.5] - 2020-03-13 - -(cobra client) ws cobra subscribe resubscribe at latest position after being disconnected - -## [8.2.4] - 2020-03-13 - -(cobra client) can subscribe with a position - -## [8.2.3] - 2020-03-13 - -(cobra client) pass the message position to the subscription data callback - -## [8.2.2] - 2020-03-12 - -(openssl tls backend) Fix a hand in OpenSSL when using TLS v1.3 ... by disabling TLS v1.3 - -## [8.2.1] - 2020-03-11 - -(cobra) IXCobraConfig struct has tlsOptions and per message deflate options - -## [8.2.0] - 2020-03-11 - -(cobra) add IXCobraConfig struct to pass cobra config around - -## [8.1.9] - 2020-03-09 - -(ws cobra_subscribe) add a --fluentd option to wrap a message in an enveloppe so that fluentd can recognize it - -## [8.1.8] - 2020-03-02 - -(websocket server) fix regression with disabling zlib extension on the server side. If a client does not support this extension the server will handle it fine. We still need to figure out how to disable the option. - -## [8.1.7] - 2020-02-26 - -(websocket) traffic tracker received bytes is message size while it should be wire size - -## [8.1.6] - 2020-02-26 - -(ws_connect) display sent/received bytes statistics on exit - -## [8.1.5] - 2020-02-23 - -(server) give thread name to some usual worker threads / unittest is broken !! - -## [8.1.4] - 2020-02-22 - -(websocket server) fix regression from 8.1.2, where per-deflate message compression was always disabled - -## [8.1.3] - 2020-02-21 - -(client + server) Fix #155 / http header parser should treat the space(s) after the : delimiter as optional. Fixing this bug made us discover that websocket sub-protocols are not properly serialiazed, but start with a , - -## [8.1.2] - 2020-02-18 - -(WebSocketServer) add option to disable deflate compression, exposed with the -x option to ws echo_server - -## [8.1.1] - 2020-02-18 - -(ws cobra to statsd and sentry sender) exit if no messages are received for one minute, which is a sign that something goes wrong on the server side. That should be changed to be configurable in the future - -## [8.1.0] - 2020-02-13 - -(http client + sentry minidump upload) Multipart stream closing boundary is invalid + mark some options as mandatory in the command line tools - -## [8.0.7] - 2020-02-12 - -(build) remove the unused subtree which was causing some way of installing to break - -## [8.0.6] - 2020-01-31 - -(snake) add an option to disable answering pongs as response to pings, to test cobra client behavior with hanged connections - -## [8.0.5] - 2020-01-31 - -(IXCobraConnection) set a ping timeout of 90 seconds. If no pong messages are received as responses to ping for a while, give up and close the connection - -## [8.0.4] - 2020-01-31 - -(cobra to sentry) remove noisy logging - -## [8.0.3] - 2020-01-30 - -(ixcobra) check if we are authenticated in publishNext before trying to publish a message - -## [8.0.2] - 2020-01-28 - -Extract severity level when emitting messages to sentry - -## [8.0.1] - 2020-01-28 - -Fix bug #151 - If a socket connection is interrupted, calling stop() on the IXWebSocket object blocks until the next retry - -## [8.0.0] - 2020-01-26 - -(SocketServer) add ability to bind on an ipv6 address - -## [7.9.6] - 2020-01-22 - -(ws) add a dnslookup sub-command, to get the ip address of a remote host - -## [7.9.5] - 2020-01-14 - -(windows) fix #144, get rid of stubbed/un-implemented windows schannel ssl backend - -## [7.9.4] - 2020-01-12 - -(openssl + mbedssl) fix #140, can send large files with ws send over ssl / still broken with apple ssl - -## [7.9.3] - 2020-01-10 - -(apple ssl) model write method after the OpenSSL one for consistency - -## [7.9.2] - 2020-01-06 - -(apple ssl) unify read and write ssl utility code - -## [7.9.1] - 2020-01-06 - -(websocket client) better error propagation when errors are detected while sending data -(ws send) detect failures to send big files, terminate in those cases and report error - -## [7.9.0] - 2020-01-04 - -(ws send) add option (-x) to disable per message deflate compression - -## [7.8.9] - 2020-01-04 - -(ws send + receive) handle all message types (ping + pong + fragment) / investigate #140 - -## [7.8.8] - 2019-12-28 - -(mbedtls) fix related to private key file parsing and initialization - -## [7.8.6] - 2019-12-28 - -(ws cobra to sentry/statsd) fix for handling null events properly for empty queues + use queue to send data to statsd - -## [7.8.5] - 2019-12-28 - -(ws cobra to sentry) handle null events for empty queues - -## [7.8.4] - 2019-12-27 - -(ws cobra to sentry) game is picked in a fair manner, so that all games get the same share of sent events - -## [7.8.3] - 2019-12-27 - -(ws cobra to sentry) refactor queue related code into a class - -## [7.8.2] - 2019-12-25 - -(ws cobra to sentry) bound the queue size used to hold up cobra messages before they are sent to sentry. Default queue size is a 100 messages. Without such limit the program runs out of memory when a subscriber receive a lot of messages that cannot make it to sentry - -## [7.8.1] - 2019-12-25 - -(ws client) use correct compilation defines so that spdlog is not used as a header only library (reduce binary size and increase compilation speed) - -## [7.8.0] - 2019-12-24 - -(ws client) all commands use spdlog instead of std::cerr or std::cout for logging - -## [7.6.5] - 2019-12-24 - -(cobra client) send a websocket ping every 30s to keep the connection opened - -## [7.6.4] - 2019-12-22 - -(client) error handling, quote url in error case when failing to parse one -(ws) ws_cobra_publish: register callbacks before connecting -(doc) mention mbedtls in supported ssl server backend - -## [7.6.3] - 2019-12-20 - -(tls) add a simple description of the TLS configuration routine for debugging - -## [7.6.2] - 2019-12-20 - -(mbedtls) correct support for using own certificate and private key - -## [7.6.1] - 2019-12-20 - -(ws commands) in websocket proxy, disable automatic reconnections + in Dockerfile, use alpine 3.11 - -## [7.6.0] - 2019-12-19 - -(cobra) Add TLS options to all cobra commands and classes. Add example to the doc. - -## [7.5.8] - 2019-12-18 - -(cobra-to-sentry) capture application version from device field - -## [7.5.7] - 2019-12-18 - -(tls) Experimental TLS server support with mbedtls (windows) + process cert tlsoption (client + server) - -## [7.5.6] - 2019-12-18 - -(tls servers) Make it clear that apple ssl and mbedtls backends do not support SSL in server mode - -## [7.5.5] - 2019-12-17 - -(tls options client) TLSOptions struct _validated member should be initialized to false - -## [7.5.4] - 2019-12-16 - -(websocket client) improve the error message when connecting to a non websocket server - -Before: - -``` -Connection error: Got bad status connecting to example.com:443, status: 200, HTTP Status line: HTTP/1.1 200 OK -``` - -After: - -``` -Connection error: Expecting status 101 (Switching Protocol), got 200 status connecting to example.com:443, HTTP Status line: HTTP/1.1 200 OK -``` - -## [7.5.3] - 2019-12-12 - -(server) attempt at fixing #131 by using blocking writes in server mode - -## [7.5.2] - 2019-12-11 - -(ws) cobra to sentry - created events with sentry tags based on tags present in the cobra messages - -## [7.5.1] - 2019-12-06 - -(mac) convert SSL errors to utf8 - -## [7.5.0] - 2019-12-05 - -- (ws) cobra to sentry. Handle Error 429 Too Many Requests and politely wait before sending more data to sentry. - -In the example below sentry we are sending data too fast, sentry asks us to slow down which we do. Notice how the sent count stop increasing, while we are waiting for 41 seconds. - -``` -[2019-12-05 15:50:33.759] [info] messages received 2449 sent 3 -[2019-12-05 15:50:34.759] [info] messages received 5533 sent 7 -[2019-12-05 15:50:35.759] [info] messages received 8612 sent 11 -[2019-12-05 15:50:36.759] [info] messages received 11562 sent 15 -[2019-12-05 15:50:37.759] [info] messages received 14410 sent 19 -[2019-12-05 15:50:38.759] [info] messages received 17236 sent 23 -[2019-12-05 15:50:39.282] [error] Error sending data to sentry: 429 -[2019-12-05 15:50:39.282] [error] Body: {"exception":[{"stacktrace":{"frames":[{"filename":"WorldScene.lua","function":"WorldScene.lua:1935","lineno":1958},{"filename":"WorldScene.lua","function":"onUpdate_WorldCam","lineno":1921},{"filename":"WorldMapTile.lua","function":"__index","lineno":239}]},"value":"noisytypes: Attempt to call nil(nil,2224139838)!"}],"platform":"python","sdk":{"name":"ws","version":"1.0.0"},"tags":[["game","niso"],["userid","107638363"],["environment","live"]],"timestamp":"2019-12-05T23:50:39Z"} - -[2019-12-05 15:50:39.282] [error] Response: {"error_name":"rate_limit","error":"Creation of this event was denied due to rate limiting"} -[2019-12-05 15:50:39.282] [warning] Error 429 - Too Many Requests. ws will sleep and retry after 41 seconds -[2019-12-05 15:50:39.760] [info] messages received 18839 sent 25 -[2019-12-05 15:50:40.760] [info] messages received 18839 sent 25 -[2019-12-05 15:50:41.760] [info] messages received 18839 sent 25 -[2019-12-05 15:50:42.761] [info] messages received 18839 sent 25 -[2019-12-05 15:50:43.762] [info] messages received 18839 sent 25 -[2019-12-05 15:50:44.763] [info] messages received 18839 sent 25 -[2019-12-05 15:50:45.768] [info] messages received 18839 sent 25 -``` - -## [7.4.5] - 2019-12-03 - -- (ws) #125 / fix build problem when jsoncpp is not installed locally - -## [7.4.4] - 2019-12-03 - -- (ws) #125 / cmake detects an already installed jsoncpp and will try to use this one if present - -## [7.4.3] - 2019-12-03 - -- (http client) use std::unordered_map instead of std::map for HttpParameters and HttpFormDataParameters class aliases - -## [7.4.2] - 2019-12-02 - -- (client) internal IXDNSLookup class requires a valid cancellation request function callback to be passed in - -## [7.4.1] - 2019-12-02 - -- (client) fix an overflow in the exponential back off code - -## [7.4.0] - 2019-11-25 - -- (http client) Add support for multipart HTTP POST upload -- (ixsentry) Add support for uploading a minidump to sentry - -## [7.3.5] - 2019-11-20 - -- On Darwin SSL, add ability to skip peer verification. - -## [7.3.4] - 2019-11-20 - -- 32-bits compile fix, courtesy of @fcojavmc - -## [7.3.1] - 2019-11-16 - -- ws proxy_server / remote server close not forwarded to the client - -## [7.3.0] - 2019-11-15 - -- New ws command: `ws proxy_server`. - -## [7.2.2] - 2019-11-01 - -- Tag a release + minor reformating. - -## [7.2.1] - 2019-10-26 - -- Add unittest to IXSentryClient to lua backtrace parsing code - -## [7.2.0] - 2019-10-24 - -- Add cobra_metrics_to_redis sub-command to create streams for each cobra metric event being received. - -## [7.1.0] - 2019-10-13 - -- Add client support for websocket subprotocol. Look for the new addSubProtocol method for details. - -## [7.0.0] - 2019-10-01 - -- TLS support in server code, only implemented for the OpenSSL SSL backend for now. - -## [6.3.4] - 2019-09-30 - -- all ws subcommands propagate tls options to servers (unimplemented) or ws or http client (implemented) (contributed by Matt DeBoer) - -## [6.3.3] - 2019-09-30 - -- ws has a --version option - -## [6.3.2] - 2019-09-29 - -- (http + websocket clients) can specify cacert and some other tls options (not implemented on all backend). This makes it so that server certs can finally be validated on windows. - -## [6.3.1] - 2019-09-29 - -- Add ability to use OpenSSL on apple platforms. - -## [6.3.0] - 2019-09-28 - -- ixcobra / fix crash in CobraConnection::publishNext when the queue is empty + handle CobraConnection_PublishMode_Batch in CobraMetricsThreadedPublisher - -## [6.2.9] - 2019-09-27 - -- mbedtls fixes / the unittest now pass on macOS, and hopefully will on Windows/AppVeyor as well. - -## [6.2.8] - 2019-09-26 - -- Http server: add options to ws https to redirect all requests to a given url. POST requests will get a 200 and an empty response. - -``` -ws httpd -L --redirect_url https://www.google.com -``` - -## [6.2.7] - 2019-09-25 - -- Stop having ws send subcommand send a binary message in text mode, which would cause error in `make ws_test` shell script test. - -## [6.2.6] - 2019-09-24 - -- Fix 2 race conditions detected with TSan, one in CobraMetricsPublisher::push and another one in WebSocketTransport::sendData (that one was bad). - -## [6.2.5] - 2019-09-23 - -- Add simple Redis Server which is only capable of doing publish / subscribe. New ws redis_server sub-command to use it. The server is used in the unittest, so that we can run on CI in environment where redis isn not available like github actions env. - -## [6.2.4] - 2019-09-22 - -- Add options to configure TLS ; contributed by Matt DeBoer. Only implemented for OpenSSL TLS backend for now. - -## [6.2.3] - 2019-09-21 - -- Fix crash in the Linux unittest in the HTTP client code, in Socket::readBytes -- Cobra Metrics Publisher code returns the message id of the message that got published, to be used to validated that it got sent properly when receiving an ack. - -## [6.2.2] - 2019-09-19 - -- In DNS lookup code, make sure the weak pointer we use lives through the expected scope (if branch) - -## [6.2.1] - 2019-09-17 - -- On error while doing a client handshake, additionally display port number next to the host name - -## [6.2.0] - 2019-09-09 - -- websocket and http server: server does not close the bound client socket in many cases -- improve some websocket error messages -- add a utility function with unittest to parse status line and stop using scanf which triggers warnings on Windows -- update ws CLI11 (our command line argument parsing library) to the latest, which fix a compiler bug about optional - -## [6.1.0] - 2019-09-08 - -- move poll wrapper on top of select (only used on Windows) to the ix namespace - -## [6.0.1] - 2019-09-05 - -- add cobra metrics publisher + server unittest -- add cobra client + server unittest -- ws snake (cobra simple server) add basic support for unsubscription + subscribe send the proper subscription data + redis client subscription can be cancelled -- IXCobraConnection / pdu handlers can crash if they receive json data which is not an object - -## [6.0.0] - 2019-09-04 - -- all client autobahn test should pass ! -- zlib/deflate has a bug with windowsbits == 8, so we silently upgrade it to 9/ (fix autobahn test 13.X which uses 8 for the windows size) - -## [5.2.0] - 2019-09-04 - -- Fragmentation: for sent messages which are compressed, the continuation fragments should not have the rsv1 bit set (fix all autobahn tests for zlib compression 12.X) -- Websocket Server / do a case insensitive string search when looking for an Upgrade header whose value is websocket. (some client use WebSocket with some upper-case characters) - -## [5.1.9] - 2019-09-03 - -- ws autobahn / report progress with spdlog::info to get timing info -- ws autobahn / use condition variables for stopping test case + add more logging on errors - -## [5.1.8] - 2019-09-03 - -- Per message deflate/compression: handle fragmented messages (fix autobahn test: 12.1.X and probably others) - -## [5.1.7] - 2019-09-03 - -- Receiving invalid UTF-8 TEXT message should fail and close the connection (fix remaining autobahn test: 6.X UTF-8 Handling) - -## [5.1.6] - 2019-09-03 - -- Sending invalid UTF-8 TEXT message should fail and close the connection (fix remaining autobahn test: 6.X UTF-8 Handling) -- Fix failing unittest which was sending binary data in text mode with WebSocket::send to call properly call WebSocket::sendBinary instead. -- Validate that the reason is proper utf-8. (fix autobahn test 7.5.1) -- Validate close codes. Autobahn 7.9.* - -## [5.1.5] - 2019-09-03 - -Framentation: data and continuation blocks received out of order (fix autobahn test: 5.9 through 5.20 Fragmentation) - -## [5.1.4] - 2019-09-03 - -Sending invalid UTF-8 TEXT message should fail and close the connection (fix **tons** of autobahn test: 6.X UTF-8 Handling) - -## [5.1.3] - 2019-09-03 - -Message type (TEXT or BINARY) is invalid for received fragmented messages (fix autobahn test: 5.3 through 5.8 Fragmentation) - -## [5.1.2] - 2019-09-02 - -Ping and Pong messages cannot be fragmented (fix autobahn test: 5.1 and 5.2 Fragmentation) - -## [5.1.1] - 2019-09-01 - -Close connections when reserved bits are used (fix autobahn test: 3.X Reserved Bits) - -## [5.1.0] - 2019-08-31 - -- ws autobahn / Add code to test websocket client compliance with the autobahn test-suite -- add utf-8 validation code, not hooked up properly yet -- Ping received with a payload too large (> 125 bytes) trigger a connection closure -- cobra / add tracking about published messages -- cobra / publish returns a message id, that can be used when -- cobra / new message type in the message received handler when publish/ok is received (can be used to implement an ack system). - -## [5.0.9] - 2019-08-30 - -- User-Agent header is set when not specified. -- New option to cap the max wait between reconnection attempts. Still default to 10s. (setMaxWaitBetweenReconnectionRetries). - -``` -ws connect --max_wait 5000 ws://example.com # will only wait 5 seconds max between reconnection attempts -``` - -## [5.0.7] - 2019-08-23 -- WebSocket: add new option to pass in extra HTTP headers when connecting. -- `ws connect` add new option (-H, works like [curl](https://stackoverflow.com/questions/356705/how-to-send-a-header-using-a-http-request-through-a-curl-call)) to pass in extra HTTP headers when connecting - -If you run against `ws echo_server` you will see the headers being received printed in the terminal. -``` -ws connect -H "foo: bar" -H "baz: buz" ws://127.0.0.1:8008 -``` - -- CobraConnection: sets a unique id field for all messages sent to [cobra](https://github.com/machinezone/cobra). -- CobraConnection: sets a counter as a field for each event published. - -## [5.0.6] - 2019-08-22 -- Windows: silly compile error (poll should be in the global namespace) - -## [5.0.5] - 2019-08-22 -- Windows: use select instead of WSAPoll, through a poll wrapper - -## [5.0.4] - 2019-08-20 -- Windows build fixes (there was a problem with the use of ::poll that has a different name on Windows (WSAPoll)) - -## [5.0.3] - 2019-08-14 -- CobraMetricThreadedPublisher _enable flag is an atomic, and CobraMetricsPublisher is enabled by default - -## [5.0.2] - 2019-08-01 -- ws cobra_subscribe has a new -q (quiet) option -- ws cobra_subscribe knows to and display msg stats (count and # of messages received per second) -- ws cobra_subscribe, cobra_to_statsd and cobra_to_sentry commands have a new option, --filter to restrict the events they want to receive - -## [5.0.1] - 2019-07-25 -- ws connect command has a new option to send in binary mode (still default to text) -- ws connect command has readline history thanks to libnoise-cpp. Now ws connect one can use using arrows to lookup previous sent messages and edit them - -## [5.0.0] - 2019-06-23 -### Changed -- New HTTP server / still very early. ws gained a new command, httpd can run a simple webserver serving local files. -- IXDNSLookup. Uses weak pointer + smart_ptr + shared_from_this instead of static sets + mutex to handle object going away before dns lookup has resolved -- cobra_to_sentry / backtraces are reversed and line number is not extracted correctly -- mbedtls and zlib are searched with find_package, and we use the vendored version if nothing is found -- travis CI uses g++ on Linux - -## [4.0.0] - 2019-06-09 -### Changed -- WebSocket::send() sends message in TEXT mode by default -- WebSocketMessage sets a new binary field, which tells whether the received incoming message is binary or text -- WebSocket::send takes a third arg, binary which default to true (can be text too) -- WebSocket callback only take one object, a const ix::WebSocketMessagePtr& msg -- Add explicit WebSocket::sendBinary method -- New headers + WebSocketMessage class to hold message data, still not used across the board -- Add test/compatibility folder with small servers and clients written in different languages and different libraries to test compatibility. -- ws echo_server has a -g option to print a greeting message on connect -- IXSocketMbedTLS: better error handling in close and connect - -## [3.1.2] - 2019-06-06 -### Added -- ws connect has a -x option to disable per message deflate -- Add WebSocket::disablePerMessageDeflate() option. - -## [3.0.0] - 2019-06-xx -### Changed -- TLS, aka SSL works on Windows (websocket and http clients) -- ws command line tool build on Windows -- Async API for HttpClient -- HttpClient API changed to use shared_ptr for response and request diff --git a/3rdparty/ixwebsocket/docs/build.md b/3rdparty/ixwebsocket/docs/build.md deleted file mode 100644 index eb61533..0000000 --- a/3rdparty/ixwebsocket/docs/build.md +++ /dev/null @@ -1,119 +0,0 @@ -## Build - -### Building static libraries - -A static library can be build using: -``` -mkdir build #make a build dir so that you can build out of tree -cd build -cmake -DUSE_TLS=1 .. -make -j -``` -There are also two build scripts in the `tools` folder for creating static libraries for android and iOS/macOS respectively.
-Arguments can be changed in the script files. - -Android: -``` -mkdir build -cd build -./../tools/build_android.sh -make -j -``` -macOS & iOS: -``` -mkdir build -cd build -./../tools/build_ios.sh -``` - -### CMake - -CMakefiles for the library and the examples are available. This library has few dependencies, so it is possible to just add the source files into your project. Otherwise the usual way will suffice. - -``` -mkdir build -cd build -cmake -DUSE_TLS=1 .. -make -j -make install # will install to /usr/local on Unix, on macOS it is a good idea to sudo chown -R `whoami`:staff /usr/local -``` - -Headers and a static library will be installed to the target dir. -There is a unittest which can be executed by typing `make test`. - -Options for building: - -* `-DBUILD_SHARED_LIBS=ON` will build the unittest as a shared libary instead of a static library, which is the default -* `-DUSE_ZLIB=1` will enable zlib support, required for http client + server + websocket per message deflate extension -* `-DUSE_TLS=1` will enable TLS support -* `-DUSE_OPEN_SSL=1` will use [openssl](https://www.openssl.org/) for the TLS support (default on Linux and Windows). When using a custom version of openssl (say a prebuilt version, odd runtime problems can happens, as in #319, and special cmake trickery will be required (see this [comment](https://github.com/machinezone/IXWebSocket/issues/175#issuecomment-620231032)) -* `-DUSE_MBED_TLS=1` will use [mbedlts](https://tls.mbed.org/) for the TLS support -* `-DUSE_WS=1` will build the ws interactive command line tool -* `-DUSE_TEST=1` will build the unittest - -If you are on Windows, look at the [appveyor](https://github.com/machinezone/IXWebSocket/blob/master/appveyor.yml) file (not maintained much though) or rather the [github actions](https://github.com/machinezone/IXWebSocket/blob/master/.github/workflows/unittest_windows.yml) which have instructions for building dependencies. - -It is also possible to externally include the project, so that everything is fetched over the wire when you build like so: - -``` - ExternalProject_Add( - IXWebSocket - GIT_REPOSITORY https://github.com/machinezone/IXWebSocket.git - ... - ) -``` - -### vcpkg - -It is possible to get IXWebSocket through Microsoft [vcpkg](https://github.com/microsoft/vcpkg). - -``` -vcpkg install ixwebsocket -``` -To use the installed package within a cmake project, use the following: -```cmake - set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "") # this is super important in order for cmake to include the vcpkg search/lib paths! - - # find library and its headers - find_path(IXWEBSOCKET_INCLUDE_DIR ixwebsocket/IXWebSocket.h) - find_library(IXWEBSOCKET_LIBRARY ixwebsocket) - # include headers - include_directories(${IXWEBSOCKET_INCLUDE_DIR}) - # ... - target_link_libraries(${PROJECT_NAME} ... ${IXWEBSOCKET_LIBRARY}) # Cmake will automatically fail the generation if the lib was not found, i.e is set to NOTFOUND - -``` - -### Conan - -[ ![Download](https://api.bintray.com/packages/conan/conan-center/ixwebsocket%3A_/images/download.svg) ](https://bintray.com/conan/conan-center/ixwebsocket%3A_/_latestVersion) - -Conan is currently supported through a recipe in [Conan Center](https://github.com/conan-io/conan-center-index/tree/master/recipes/ixwebsocket) ([Bintray entry](https://bintray.com/conan/conan-center/ixwebsocket%3A_)). - -Package reference - -* Conan 1.21.0 and up: `ixwebsocket/7.9.2` -* Earlier versions: `ixwebsocket/7.9.2@_/_` - -Note that the version listed here might not be the latest one. See Bintray or the recipe itself for the latest version. If you're migrating from the previous, custom Bintray remote, note that the package reference _has_ to be lower-case. - -### Docker - -There is a Dockerfile for running the unittest on Linux, and to run the `ws` tool. It is also available on the docker registry. - -``` -docker run docker.pkg.github.com/machinezone/ixwebsocket/ws:latest --help -``` - -To use docker-compose you must make a docker container first. - -``` -$ make docker -... -$ docker compose up & -... -$ docker exec -it ixwebsocket_ws_1 bash -app@ca2340eb9106:~$ ws --help -ws is a websocket tool -... -``` diff --git a/3rdparty/ixwebsocket/docs/design.md b/3rdparty/ixwebsocket/docs/design.md deleted file mode 100644 index 22bf7cd..0000000 --- a/3rdparty/ixwebsocket/docs/design.md +++ /dev/null @@ -1,76 +0,0 @@ -## Implementation details - -### Per Message Deflate compression. - -The per message deflate compression option is supported. It can lead to very nice bandbwith savings (20x !) if your messages are similar, which is often the case for example for chat applications. All features of the spec should be supported. - -### TLS/SSL - -Connections can be optionally secured and encrypted with TLS/SSL when using a wss:// endpoint, or using normal un-encrypted socket with ws:// endpoints. AppleSSL is used on iOS and macOS, OpenSSL and mbedTLS can be used on Android, Linux and Windows. - -If you are using OpenSSL, try to be on a version higher than 1.1.x as there there are thread safety problems with 1.0.x. - -### Polling and background thread work - -No manual polling to fetch data is required. Data is sent and received instantly by using a background thread for receiving data and the select [system](http://man7.org/linux/man-pages/man2/select.2.html) call to be notified by the OS of incoming data. No timeout is used for select so that the background thread is only woken up when data is available, to optimize battery life. This is also the recommended way of using select according to the select tutorial, section [select law](https://linux.die.net/man/2/select_tut). Read and Writes to the socket are non blocking. Data is sent right away and not enqueued by writing directly to the socket, which is [possible](https://stackoverflow.com/questions/1981372/are-parallel-calls-to-send-recv-on-the-same-socket-valid) since system socket implementations allow concurrent read/writes. - -### Automatic reconnection - -If the remote end (server) breaks the connection, the code will try to perpetually reconnect, by using an exponential backoff strategy, capped at one retry every 10 seconds. This behavior can be disabled. - -### Large messages - -Large frames are broken up into smaller chunks or messages to avoid filling up the os tcp buffers, which is permitted thanks to WebSocket [fragmentation](https://tools.ietf.org/html/rfc6455#section-5.4). Messages up to 1G were sent and received succesfully. - -### Testing - -The library has an interactive tool which is handy for testing compatibility ith other libraries. We have tested our client against Python, Erlang, Node.js, and C++ websocket server libraries. - -The unittest tries to be comprehensive, and has been running on multiple platforms, with different sanitizers such as a thread sanitizer to catch data races or the undefined behavior sanitizer. - -The regression test is running after each commit on github actions for multiple configurations. - -## Limitations - -* On some configuration (mostly Android) certificate validation needs to be setup so that SocketTLSOptions.caFile point to a pem file, such as the one distributed by Firefox. Unless that setup is done connecting to a wss endpoint will display an error. With mbedtls the message will contain `error in handshake : X509 - Certificate verification failed, e.g. CRL, CA or signature check failed`. -* Automatic reconnection works at the TCP socket level, and will detect remote end disconnects. However, if the device/computer network become unreachable (by turning off wifi), it is quite hard to reliably and timely detect it at the socket level using `recv` and `send` error codes. [Here](https://stackoverflow.com/questions/14782143/linux-socket-how-to-detect-disconnected-network-in-a-client-program) is a good discussion on the subject. This behavior is consistent with other runtimes such as node.js. One way to detect a disconnected device with low level C code is to do a name resolution with DNS but this can be expensive. Mobile devices have good and reliable API to do that. -* The server code is using select to detect incoming data, and creates one OS thread per connection. This is not as scalable as strategies using epoll or kqueue. - -## C++ code organization - -Here is a simplistic diagram which explains how the code is structured in term of class/modules. - -``` -+-----------------------+ --- Public -| | Start the receiving Background thread. Auto reconnection. Simple websocket Ping. -| IXWebSocket | Interface used by C++ test clients. No IX dependencies. -| | -+-----------------------+ -| | -| IXWebSocketServer | Run a server and give each connections its own WebSocket object. -| | Each connection is handled in a new OS thread. -| | -+-----------------------+ --- Private -| | -| IXWebSocketTransport | Low level websocket code, framing, managing raw socket. Adapted from easywsclient. -| | -+-----------------------+ -| | -| IXWebSocketHandshake | Establish the connection between client and server. -| | -+-----------------------+ -| | -| IXWebSocket | ws:// Unencrypted Socket handler -| IXWebSocketAppleSSL | wss:// TLS encrypted Socket AppleSSL handler. Used on iOS and macOS -| IXWebSocketOpenSSL | wss:// TLS encrypted Socket OpenSSL handler. Used on Android and Linux -| | Can be used on macOS too. -+-----------------------+ -| | -| IXSocketConnect | Connect to the remote host (client). -| | -+-----------------------+ -| | -| IXDNSLookup | Does DNS resolution asynchronously so that it can be interrupted. -| | -+-----------------------+ -``` diff --git a/3rdparty/ixwebsocket/docs/index.md b/3rdparty/ixwebsocket/docs/index.md deleted file mode 100644 index ff07c65..0000000 --- a/3rdparty/ixwebsocket/docs/index.md +++ /dev/null @@ -1,149 +0,0 @@ -## Hello world - -IXWebSocket is a C++ library for WebSocket client and server development. It has minimal dependencies (no boost), is very simple to use and support everything you'll likely need for websocket dev (SSL, deflate compression, compiles on most platforms, etc...). HTTP client and server code is also available, but it hasn't received as much testing. - -It is been used on big mobile video game titles sending and receiving tons of messages since 2017 (iOS and Android). It was tested on macOS, iOS, Linux, Android, Windows and FreeBSD. Note that the MinGW compiler is not supported at this point. Two important design goals are simplicity and correctness. - -A bad security bug affecting users compiling with SSL enabled and OpenSSL as the backend was just fixed in newly released version 11.0.0. Please upgrade ! (more details in the [https://github.com/machinezone/IXWebSocket/pull/250](PR). - -```cpp -/* - * main.cpp - * Author: Benjamin Sergeant - * Copyright (c) 2020 Machine Zone, Inc. All rights reserved. - * - * Super simple standalone example. See ws folder, unittest and doc/usage.md for more. - * - * On macOS - * $ mkdir -p build ; (cd build ; cmake -DUSE_TLS=1 .. ; make -j ; make install) - * $ clang++ --std=c++11 --stdlib=libc++ main.cpp -lixwebsocket -lz -framework Security -framework Foundation - * $ ./a.out - * - * Or use cmake -DBUILD_DEMO=ON option for other platforms - */ - -#include -#include -#include -#include - -int main() -{ - // Required on Windows - ix::initNetSystem(); - - // Our websocket object - ix::WebSocket webSocket; - - // Connect to a server with encryption - // See https://machinezone.github.io/IXWebSocket/usage/#tls-support-and-configuration - std::string url("wss://echo.websocket.org"); - webSocket.setUrl(url); - - std::cout << "Connecting to " << url << "..." << std::endl; - - // Setup a callback to be fired (in a background thread, watch out for race conditions !) - // when a message or an event (open, close, error) is received - webSocket.setOnMessageCallback([](const ix::WebSocketMessagePtr& msg) - { - if (msg->type == ix::WebSocketMessageType::Message) - { - std::cout << "received message: " << msg->str << std::endl; - std::cout << "> " << std::flush; - } - else if (msg->type == ix::WebSocketMessageType::Open) - { - std::cout << "Connection established" << std::endl; - std::cout << "> " << std::flush; - } - else if (msg->type == ix::WebSocketMessageType::Error) - { - // Maybe SSL is not configured properly - std::cout << "Connection error: " << msg->errorInfo.reason << std::endl; - std::cout << "> " << std::flush; - } - } - ); - - // Now that our callback is setup, we can start our background thread and receive messages - webSocket.start(); - - // Send a message to the server (default to TEXT mode) - webSocket.send("hello world"); - - // Display a prompt - std::cout << "> " << std::flush; - - std::string text; - // Read text from the console and send messages in text mode. - // Exit with Ctrl-D on Unix or Ctrl-Z on Windows. - while (std::getline(std::cin, text)) - { - webSocket.send(text); - std::cout << "> " << std::flush; - } - - return 0; -} -``` - -Interested? Go read the [docs](https://machinezone.github.io/IXWebSocket/)! If things don't work as expected, please create an issue on GitHub, or even better a pull request if you know how to fix your problem. - -IXWebSocket is actively being developed, check out the [changelog](https://machinezone.github.io/IXWebSocket/CHANGELOG/) to know what's cooking. If you are looking for a real time messaging service (the chat-like 'server' your websocket code will talk to) with many features such as history, backed by Redis, look at [cobra](https://github.com/machinezone/cobra). - -IXWebSocket client code is autobahn compliant beginning with the 6.0.0 version. See the current [test results](https://bsergean.github.io/autobahn/reports/clients/index.html). Some tests are still failing in the server code. - -Starting with the 11.0.8 release, IXWebSocket should be fully C++11 compatible. - -## Users - -If your company or project is using this library, feel free to open an issue or PR to amend this list. - -- [Machine Zone](https://www.mz.com) -- [Tokio](https://gitlab.com/HCInk/tokio), a discord library focused on audio playback with node bindings. -- [libDiscordBot](https://github.com/tostc/libDiscordBot/tree/master), an easy to use Discord-bot framework. -- [gwebsocket](https://github.com/norrbotten/gwebsocket), a websocket (lua) module for Garry's Mod -- [DisCPP](https://github.com/DisCPP/DisCPP), a simple but feature rich Discord API wrapper -- [discord.cpp](https://github.com/luccanunes/discord.cpp), a discord library for making bots -- [Teleport](http://teleportconnect.com/), Teleport is your own personal remote robot avatar - -## Alternative libraries - -There are plenty of great websocket libraries out there, which might work for you. Here are a couple of serious ones. - -* [websocketpp](https://github.com/zaphoyd/websocketpp) - C++ -* [beast](https://github.com/boostorg/beast) - C++ -* [libwebsockets](https://libwebsockets.org/) - C -* [µWebSockets](https://github.com/uNetworking/uWebSockets) - C -* [wslay](https://github.com/tatsuhiro-t/wslay) - C - -[uvweb](https://github.com/bsergean/uvweb) is a library written by the IXWebSocket author which is built on top of [uvw](https://github.com/skypjack/uvw), which is a C++ wrapper for [libuv](https://libuv.org/). It has more dependencies and does not support SSL at this point, but it can be used to open multiple connections within a single OS thread thanks to libuv. - -To check the performance of a websocket library, you can look at the [autoroute](https://github.com/bsergean/autoroute) project. - -## Continuous Integration - -| OS | TLS | Sanitizer | Status | -|-------------------|-------------------|-------------------|-------------------| -| Linux | OpenSSL | None | [![Build2][1]][0] | -| macOS | Secure Transport | Thread Sanitizer | [![Build2][2]][0] | -| macOS | OpenSSL | Thread Sanitizer | [![Build2][3]][0] | -| macOS | MbedTLS | Thread Sanitizer | [![Build2][4]][0] | -| Windows | Disabled | None | [![Build2][5]][0] | -| UWP | Disabled | None | [![Build2][6]][0] | -| Linux | OpenSSL | Address Sanitizer | [![Build2][7]][0] | -| Mingw | Disabled | None | [![Build2][8]][0] | - -* ASAN fails on Linux because of a known problem, we need a -* Some tests are disabled on Windows/UWP because of a pathing problem -* TLS and ZLIB are disabled on Windows/UWP because enabling make the CI run takes a lot of time, for setting up vcpkg. - -[0]: https://github.com/machinezone/IXWebSocket -[1]: https://github.com/machinezone/IXWebSocket/workflows/linux/badge.svg -[2]: https://github.com/machinezone/IXWebSocket/workflows/mac_tsan_sectransport/badge.svg -[3]: https://github.com/machinezone/IXWebSocket/workflows/mac_tsan_openssl/badge.svg -[4]: https://github.com/machinezone/IXWebSocket/workflows/mac_tsan_mbedtls/badge.svg -[5]: https://github.com/machinezone/IXWebSocket/workflows/windows/badge.svg -[6]: https://github.com/machinezone/IXWebSocket/workflows/uwp/badge.svg -[7]: https://github.com/machinezone/IXWebSocket/workflows/linux_asan/badge.svg -[8]: https://github.com/machinezone/IXWebSocket/workflows/unittest_windows_gcc/badge.svg diff --git a/3rdparty/ixwebsocket/docs/packages.md b/3rdparty/ixwebsocket/docs/packages.md deleted file mode 100644 index e1a307d..0000000 --- a/3rdparty/ixwebsocket/docs/packages.md +++ /dev/null @@ -1,94 +0,0 @@ -Notes on how we can update the different packages for ixwebsocket. - -## VCPKG - -Visit the [releases](https://github.com/machinezone/IXWebSocket/releases) page on Github. A tag must have been made first. - -Download the latest entry. - -``` -$ cd /tmp -/tmp$ curl -s -O -L https://github.com/machinezone/IXWebSocket/archive/v9.1.9.tar.gz -/tmp$ -/tmp$ openssl sha512 v9.1.9.tar.gz -SHA512(v9.1.9.tar.gz)= f1fd731b5f6a9ce6d6d10bee22a5d9d9baaa8ea0564d6c4cd7eb91dcb88a45c49b2c7fdb75f8640a3589c1b30cee33ef5df8dcbb55920d013394d1e33ddd3c8e -``` - -Now go punch those values in the vcpkg ixwebsocket port config files. Here is what the diff look like. - -``` -vcpkg$ git diff -diff --git a/ports/ixwebsocket/CONTROL b/ports/ixwebsocket/CONTROL -index db9c2adc9..4acae5c3f 100644 ---- a/ports/ixwebsocket/CONTROL -+++ b/ports/ixwebsocket/CONTROL -@@ -1,5 +1,5 @@ - Source: ixwebsocket --Version: 8.0.5 -+Version: 9.1.9 - Build-Depends: zlib - Homepage: https://github.com/machinezone/IXWebSocket - Description: Lightweight WebSocket Client and Server + HTTP Client and Server -diff --git a/ports/ixwebsocket/portfile.cmake b/ports/ixwebsocket/portfile.cmake -index de082aece..68e523a05 100644 ---- a/ports/ixwebsocket/portfile.cmake -+++ b/ports/ixwebsocket/portfile.cmake -@@ -1,8 +1,8 @@ - vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO machinezone/IXWebSocket -- REF v8.0.5 -- SHA512 9dcc20d9a0629b92c62a68a8bd7c8206f18dbd9e93289b0b687ec13c478ce9ad1f3563b38c399c8277b0d3812cc78ca725786ba1dedbc3445b9bdb9b689e8add -+ REF v9.1.9 -+ SHA512 f1fd731b5f6a9ce6d6d10bee22a5d9d9baaa8ea0564d6c4cd7eb91dcb88a45c49b2c7fdb75f8640a3589c1b30cee33ef5df8dcbb55920d013394d1e33ddd3c8e - ) -``` - -You will need a fork of the vcpkg repo to make a pull request. - -``` -git fetch upstream -git co master -git reset --hard upstream/master -git push origin master --force -``` - -Make the pull request (I use a new branch to do that). - -``` -vcpkg$ git co -b feature/ixwebsocket_9.1.9 -M ports/ixwebsocket/CONTROL -M ports/ixwebsocket/portfile.cmake -Switched to a new branch 'feature/ixwebsocket_9.1.9' -vcpkg$ -vcpkg$ -vcpkg$ git commit -am 'ixwebsocket: update to 9.1.9' -[feature/ixwebsocket_9.1.9 8587a4881] ixwebsocket: update to 9.1.9 - 2 files changed, 3 insertions(+), 3 deletions(-) -vcpkg$ -vcpkg$ git push -fatal: The current branch feature/ixwebsocket_9.1.9 has no upstream branch. -To push the current branch and set the remote as upstream, use - - git push --set-upstream origin feature/ixwebsocket_9.1.9 - -vcpkg$ git push --set-upstream origin feature/ixwebsocket_9.1.9 - -Enumerating objects: 11, done. -Counting objects: 100% (11/11), done. -Delta compression using up to 8 threads -Compressing objects: 100% (6/6), done. -Writing objects: 100% (6/6), 621 bytes | 621.00 KiB/s, done. -Total 6 (delta 4), reused 0 (delta 0) -remote: Resolving deltas: 100% (4/4), completed with 4 local objects. -remote: -remote: Create a pull request for 'feature/ixwebsocket_9.1.9' on GitHub by visiting: -remote: https://github.com/bsergean/vcpkg/pull/new/feature/ixwebsocket_9.1.9 -remote: -To https://github.com/bsergean/vcpkg.git - * [new branch] feature/ixwebsocket_9.1.9 -> feature/ixwebsocket_9.1.9 -Branch 'feature/ixwebsocket_9.1.9' set up to track remote branch 'feature/ixwebsocket_9.1.9' from 'origin' by rebasing. -vcpkg$ -``` - -Just visit this url, https://github.com/bsergean/vcpkg/pull/new/feature/ixwebsocket_9.1.9, printed on the console, to make the pull request. diff --git a/3rdparty/ixwebsocket/docs/performance.md b/3rdparty/ixwebsocket/docs/performance.md deleted file mode 100644 index 3720bc5..0000000 --- a/3rdparty/ixwebsocket/docs/performance.md +++ /dev/null @@ -1,37 +0,0 @@ - -## WebSocket Client performance - -We will run a client and a server on the same machine, connecting to localhost. This bench is run on a MacBook Pro from 2015. We can receive over 200,000 (small) messages per second, another way to put it is that it takes 5 micro-second to receive and process one message. This is an indication about the minimal latency to receive messages. - -### Receiving messages - -By using the push_server ws sub-command, the server will send the same message in a loop to any connected client. - -``` -ws push_server -q --send_msg 'yo' -``` - -By using the echo_client ws sub-command, with the -m (mute or no_send), we will display statistics on how many messages we can receive per second. - -``` -$ ws echo_client -m ws://localhost:8008 -[2020-08-02 12:31:17.284] [info] ws_echo_client: connected -[2020-08-02 12:31:17.284] [info] Uri: / -[2020-08-02 12:31:17.284] [info] Headers: -[2020-08-02 12:31:17.284] [info] Connection: Upgrade -[2020-08-02 12:31:17.284] [info] Sec-WebSocket-Accept: byy/pMK2d0PtRwExaaiOnXJTQHo= -[2020-08-02 12:31:17.284] [info] Server: ixwebsocket/10.1.4 macos ssl/SecureTransport zlib 1.2.11 -[2020-08-02 12:31:17.284] [info] Upgrade: websocket -[2020-08-02 12:31:17.663] [info] messages received: 0 per second 2595307 total -[2020-08-02 12:31:18.668] [info] messages received: 79679 per second 2674986 total -[2020-08-02 12:31:19.668] [info] messages received: 207438 per second 2882424 total -[2020-08-02 12:31:20.673] [info] messages received: 209207 per second 3091631 total -[2020-08-02 12:31:21.676] [info] messages received: 216056 per second 3307687 total -[2020-08-02 12:31:22.680] [info] messages received: 214927 per second 3522614 total -[2020-08-02 12:31:23.684] [info] messages received: 216960 per second 3739574 total -[2020-08-02 12:31:24.688] [info] messages received: 215232 per second 3954806 total -[2020-08-02 12:31:25.691] [info] messages received: 212300 per second 4167106 total -[2020-08-02 12:31:26.694] [info] messages received: 212501 per second 4379607 total -[2020-08-02 12:31:27.699] [info] messages received: 212330 per second 4591937 total -[2020-08-02 12:31:28.702] [info] messages received: 216511 per second 4808448 total -``` diff --git a/3rdparty/ixwebsocket/docs/usage.md b/3rdparty/ixwebsocket/docs/usage.md deleted file mode 100644 index 0a02e28..0000000 --- a/3rdparty/ixwebsocket/docs/usage.md +++ /dev/null @@ -1,644 +0,0 @@ -# Examples - -The [*ws*](https://github.com/machinezone/IXWebSocket/tree/master/ws) folder countains many interactive programs for chat, [file transfers](https://github.com/machinezone/IXWebSocket/blob/master/ws/ws_send.cpp), [curl like](https://github.com/machinezone/IXWebSocket/blob/master/ws/ws_http_client.cpp) http clients, demonstrating client and server usage. - -## Windows note - -To use the network system on Windows, you need to initialize it once with *WSAStartup()* and clean it up with *WSACleanup()*. We have helpers for that which you can use, see below. This init would typically take place in your main function. - -```cpp -#include - -int main() -{ - ix::initNetSystem(); - - ... - - ix::uninitNetSystem(); - return 0; -} -``` - -## WebSocket client API - -```cpp -#include - -... - -// Our websocket object -ix::WebSocket webSocket; - -std::string url("ws://localhost:8080/"); -webSocket.setUrl(url); - -// Optional heart beat, sent every 45 seconds when there is not any traffic -// to make sure that load balancers do not kill an idle connection. -webSocket.setPingInterval(45); - -// Per message deflate connection is not enabled by default. You can tweak its parameters, enable or disable it with -webSocket.enablePerMessageDeflate(); -webSocket.disablePerMessageDeflate(); - -// Setup a callback to be fired when a message or an event (open, close, error) is received -webSocket.setOnMessageCallback([](const ix::WebSocketMessagePtr& msg) - { - if (msg->type == ix::WebSocketMessageType::Message) - { - std::cout << msg->str << std::endl; - } - } -); - -// Now that our callback is setup, we can start our background thread and receive messages -webSocket.start(); - -// Send a message to the server (default to TEXT mode) -webSocket.send("hello world"); - -// The message can be sent in BINARY mode (useful if you send MsgPack data for example) -webSocket.sendBinary("some serialized binary data"); - -// ... finally ... - -// Stop the connection -webSocket.stop() -``` - -### Sending messages - -`WebSocketSendInfo result = websocket.send("foo")` will send a message. - -If the connection was closed, sending will fail, and the success field of the result object will be set to false. There could also be a compression error in which case the compressError field will be set to true. The payloadSize field and wireSize fields will tell you respectively how much bytes the message weight, and how many bytes were sent on the wire (potentially compressed + counting the message header (a few bytes). - -There is an optional progress callback that can be passed in as the second argument. If a message is large it will be fragmented into chunks which will be sent independantly. Everytime the we can write a fragment into the OS network cache, the callback will be invoked. If a user wants to cancel a slow send, false should be returned from within the callback. - -Here is an example code snippet copied from the ws send sub-command. Each fragment weights 32K, so the total integer is the wireSize divided by 32K. As an example if you are sending 32M of data, uncompressed, total will be 1000. current will be set to 0 for the first fragment, then 1, 2 etc... - -``` -auto result = - _webSocket.sendBinary(serializedMsg, [this, throttle](int current, int total) -> bool { - spdlog::info("ws_send: Step {} out of {}", current + 1, total); - - if (throttle) - { - std::chrono::duration duration(10); - std::this_thread::sleep_for(duration); - } - - return _connected; - }); -``` - -The `send()` and `sendText()` methods check that the string contains only valid UTF-8 characters. If you know that the string is a valid UTF-8 string you can skip that step and use the `sendUtf8Text` method instead. - -With the IXWebSocketSendData overloads of `sendUtf8Text` and `sendBinary` it is possible to not only send std::string but also `std::vector`, `std::vector` and `char*`. - -``` -std::vector data({1, 2, 3, 4}); -auto result = webSocket.sendBinary(data); - -const char* text = "Hello World!"; -result = webSocket.sendUtf8Text(IXWebSocketSendData(text, strlen(text))); -``` - -### ReadyState - -`getReadyState()` returns the state of the connection. There are 4 possible states. - -1. ReadyState::Connecting - The connection is not yet open. -2. ReadyState::Open - The connection is open and ready to communicate. -3. ReadyState::Closing - The connection is in the process of closing. -4. ReadyState::Closed - The connection is closed or could not be opened. - -### Open and Close notifications - -The onMessage event will be fired when the connection is opened or closed. This is similar to the [JavaScript browser API](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket), which has `open` and `close` events notification that can be registered with the browser `addEventListener`. - -```cpp -webSocket.setOnMessageCallback([](const ix::WebSocketMessagePtr& msg) - { - if (msg->type == ix::WebSocketMessageType::Open) - { - std::cout << "send greetings" << std::endl; - - // Headers can be inspected (pairs of string/string) - std::cout << "Handshake Headers:" << std::endl; - for (auto it : msg->headers) - { - std::cout << it.first << ": " << it.second << std::endl; - } - } - else if (msg->type == ix::WebSocketMessageType::Close) - { - std::cout << "disconnected" << std::endl; - - // The server can send an explicit code and reason for closing. - // This data can be accessed through the closeInfo object. - std::cout << msg->closeInfo.code << std::endl; - std::cout << msg->closeInfo.reason << std::endl; - } - } -); -``` - -### Error notification - -A message will be fired when there is an error with the connection. The message type will be `ix::WebSocketMessageType::Error`. Multiple fields will be available on the event to describe the error. - -```cpp -webSocket.setOnMessageCallback([](const ix::WebSocketMessagePtr& msg) - { - if (msg->type == ix::WebSocketMessageType::Error) - { - std::stringstream ss; - ss << "Error: " << msg->errorInfo.reason << std::endl; - ss << "#retries: " << msg->errorInfo.retries << std::endl; - ss << "Wait time(ms): " << msg->errorInfo.wait_time << std::endl; - ss << "HTTP Status: " << msg->errorInfo.http_status << std::endl; - std::cout << ss.str() << std::endl; - } - } -); -``` - -### start, stop - -1. `websocket.start()` connect to the remote server and starts the message receiving background thread. -2. `websocket.stop()` disconnect from the remote server and closes the background thread. - -### Configuring the remote url - -The url can be set and queried after a websocket object has been created. You will have to call `stop` and `start` if you want to disconnect and connect to that new url. - -```cpp -std::string url("wss://example.com"); -websocket.configure(url); -``` - -### Ping/Pong support - -Ping/pong messages are used to implement keep-alive. 2 message types exists to identify ping and pong messages. Note that when a ping message is received, a pong is instantly send back as requested by the WebSocket spec. - -```cpp -webSocket.setOnMessageCallback([](const ix::WebSocketMessagePtr& msg) - { - if (msg->type == ix::WebSocketMessageType::Ping || - msg->type == ix::WebSocketMessageType::Pong) - { - std::cout << "pong data: " << msg->str << std::endl; - } - } -); -``` - -A ping message can be sent to the server, with an optional data string. - -```cpp -websocket.ping("ping data, optional (empty string is ok): limited to 125 bytes long"); -``` - -### Heartbeat. - -You can configure an optional heart beat / keep-alive, sent every 45 seconds -when there is no any traffic to make sure that load balancers do not kill an -idle connection. - -```cpp -webSocket.setPingInterval(45); -``` - -### Supply extra HTTP headers. - -You can set extra HTTP headers to be sent during the WebSocket handshake. - -```cpp -WebSocketHttpHeaders headers; -headers["foo"] = "bar"; -webSocket.setExtraHeaders(headers); -``` - -### Subprotocols - -You can specify subprotocols to be set during the WebSocket handshake. For more info you can refer to [this doc](https://hpbn.co/websocket/#subprotocol-negotiation). - -```cpp -webSocket.addSubprotocol("appProtocol-v1"); -webSocket.addSubprotocol("appProtocol-v2"); -``` - -The protocol that the server did accept is available in the open info `protocol` field. - -```cpp -std::cout << "protocol: " << msg->openInfo.protocol << std::endl; -``` - -### Automatic reconnection - -Automatic reconnection kicks in when the connection is disconnected without the user consent. This feature is on by default and can be turned off. - -```cpp -webSocket.enableAutomaticReconnection(); // turn on -webSocket.disableAutomaticReconnection(); // turn off -bool enabled = webSocket.isAutomaticReconnectionEnabled(); // query state -``` - -The technique to calculate wait time is called [exponential -backoff](https://docs.aws.amazon.com/general/latest/gr/api-retries.html). Here -are the default waiting times between attempts (from connecting with `ws connect ws://foo.com`) - -``` -> Connection error: Got bad status connecting to foo.com, status: 301, HTTP Status line: HTTP/1.1 301 Moved Permanently - -#retries: 1 -Wait time(ms): 100 -#retries: 2 -Wait time(ms): 200 -#retries: 3 -Wait time(ms): 400 -#retries: 4 -Wait time(ms): 800 -#retries: 5 -Wait time(ms): 1600 -#retries: 6 -Wait time(ms): 3200 -#retries: 7 -Wait time(ms): 6400 -#retries: 8 -Wait time(ms): 10000 -``` - -The waiting time is capped by default at 10s between 2 attempts, but that value -can be changed and queried. The minimum waiting time can also be set. - -```cpp -webSocket.setMaxWaitBetweenReconnectionRetries(5 * 1000); // 5000ms = 5s -uint32_t m = webSocket.getMaxWaitBetweenReconnectionRetries(); - -webSocket.setMinWaitBetweenReconnectionRetries(1000); // 1000ms = 1s -uint32_t m = webSocket.getMinWaitBetweenReconnectionRetries(); -``` - -## Handshake timeout - -You can control how long to wait until timing out while waiting for the websocket handshake to be performed. - -``` -int handshakeTimeoutSecs = 1; -setHandshakeTimeout(handshakeTimeoutSecs); -``` - -## WebSocket server API - -### Legacy api - -This api was actually changed to take a weak_ptr as the first argument to setOnConnectionCallback ; previously it would take a shared_ptr which was creating cycles and then memory leaks problems. - -```cpp -#include - -... - -// Run a server on localhost at a given port. -// Bound host name, max connections and listen backlog can also be passed in as parameters. -int port = 8008; -std::string host("127.0.0.1"); // If you need this server to be accessible on a different machine, use "0.0.0.0" -ix::WebSocketServer server(port, host); - -server.setOnConnectionCallback( - [&server](std::weak_ptr webSocket, - std::shared_ptr connectionState) - { - std::cout << "Remote ip: " << connectionState->remoteIp << std::endl; - - auto ws = webSocket.lock(); - if (ws) - { - ws->setOnMessageCallback( - [webSocket, connectionState, &server](const ix::WebSocketMessagePtr msg) - { - if (msg->type == ix::WebSocketMessageType::Open) - { - std::cout << "New connection" << std::endl; - - // A connection state object is available, and has a default id - // You can subclass ConnectionState and pass an alternate factory - // to override it. It is useful if you want to store custom - // attributes per connection (authenticated bool flag, attributes, etc...) - std::cout << "id: " << connectionState->getId() << std::endl; - - // The uri the client did connect to. - std::cout << "Uri: " << msg->openInfo.uri << std::endl; - - std::cout << "Headers:" << std::endl; - for (auto it : msg->openInfo.headers) - { - std::cout << it.first << ": " << it.second << std::endl; - } - } - else if (msg->type == ix::WebSocketMessageType::Message) - { - // For an echo server, we just send back to the client whatever was received by the server - // All connected clients are available in an std::set. See the broadcast cpp example. - // Second parameter tells whether we are sending the message in binary or text mode. - // Here we send it in the same mode as it was received. - auto ws = webSocket.lock(); - if (ws) - { - ws->send(msg->str, msg->binary); - } - } - } - } - ); - } -); - -auto res = server.listen(); -if (!res.first) -{ - // Error handling - return 1; -} - -// Per message deflate connection is enabled by default. It can be disabled -// which might be helpful when running on low power devices such as a Rasbery Pi -server.disablePerMessageDeflate(); - -// Run the server in the background. Server can be stoped by calling server.stop() -server.start(); - -// Block until server.stop() is called. -server.wait(); - -``` - -### New api - -The new API does not require to use 2 nested callbacks, which is a bit annoying. The real fix is that there was a memory leak due to a shared_ptr cycle, due to passing down a shared_ptr down to the callbacks. - -The webSocket reference is guaranteed to be always valid ; by design the callback will never be invoked with a null webSocket object. - -```cpp -#include - -... - -// Run a server on localhost at a given port. -// Bound host name, max connections and listen backlog can also be passed in as parameters. -int port = 8008; -std::string host("127.0.0.1"); // If you need this server to be accessible on a different machine, use "0.0.0.0" -ix::WebSocketServer server(port, host); - -server.setOnClientMessageCallback([](std::shared_ptr connectionState, ix::WebSocket & webSocket, const ix::WebSocketMessagePtr & msg) { - // The ConnectionState object contains information about the connection, - // at this point only the client ip address and the port. - std::cout << "Remote ip: " << connectionState->getRemoteIp() << std::endl; - - if (msg->type == ix::WebSocketMessageType::Open) - { - std::cout << "New connection" << std::endl; - - // A connection state object is available, and has a default id - // You can subclass ConnectionState and pass an alternate factory - // to override it. It is useful if you want to store custom - // attributes per connection (authenticated bool flag, attributes, etc...) - std::cout << "id: " << connectionState->getId() << std::endl; - - // The uri the client did connect to. - std::cout << "Uri: " << msg->openInfo.uri << std::endl; - - std::cout << "Headers:" << std::endl; - for (auto it : msg->openInfo.headers) - { - std::cout << "\t" << it.first << ": " << it.second << std::endl; - } - } - else if (msg->type == ix::WebSocketMessageType::Message) - { - // For an echo server, we just send back to the client whatever was received by the server - // All connected clients are available in an std::set. See the broadcast cpp example. - // Second parameter tells whether we are sending the message in binary or text mode. - // Here we send it in the same mode as it was received. - std::cout << "Received: " << msg->str << std::endl; - - webSocket.send(msg->str, msg->binary); - } -}); - -auto res = server.listen(); -if (!res.first) -{ - // Error handling - return 1; -} - -// Per message deflate connection is enabled by default. It can be disabled -// which might be helpful when running on low power devices such as a Rasbery Pi -server.disablePerMessageDeflate(); - -// Run the server in the background. Server can be stoped by calling server.stop() -server.start(); - -// Block until server.stop() is called. -server.wait(); - -``` - -### Heartbeat - -You can configure an optional heartbeat / keep-alive for the WebSocket server. The heartbeat interval can be adjusted or disabled when constructing the `WebSocketServer`. Setting the interval to `-1` disables the heartbeat feature; this is the default setting. The parameter you set will be applied to every `WebSocket` object that the server creates. - -To enable a 45 second heartbeat on a `WebSocketServer`: - -```cpp -int pingIntervalSeconds = 45; -ix::WebSocketServer server(port, host, backlog, maxConnections, handshakeTimeoutSecs, addressFamily, pingIntervalSeconds); -``` - -## HTTP client API - -```cpp -#include - -... - -// -// Preparation -// -HttpClient httpClient; -HttpRequestArgsPtr args = httpClient.createRequest(); - -// Custom headers can be set -WebSocketHttpHeaders headers; -headers["Foo"] = "bar"; -args->extraHeaders = headers; - -// Timeout options -args->connectTimeout = connectTimeout; -args->transferTimeout = transferTimeout; - -// Redirect options -args->followRedirects = followRedirects; -args->maxRedirects = maxRedirects; - -// Misc -args->compress = compress; // Enable gzip compression -args->verbose = verbose; -args->logger = [](const std::string& msg) -{ - std::cout << msg; -}; - -// -// Synchronous Request -// -HttpResponsePtr out; -std::string url = "https://www.google.com"; - -// HEAD request -out = httpClient.head(url, args); - -// GET request -out = httpClient.get(url, args); - -// POST request with parameters -HttpParameters httpParameters; -httpParameters["foo"] = "bar"; - -// HTTP form data can be passed in as well, for multi-part upload of files -HttpFormDataParameters httpFormDataParameters; -httpParameters["baz"] = "booz"; - -out = httpClient.post(url, httpParameters, httpFormDataParameters, args); - -// POST request with a body -out = httpClient.post(url, std::string("foo=bar"), args); - -// PUT and PATCH are available too. - -// -// Result -// -auto statusCode = response->statusCode; // Can be HttpErrorCode::Ok, HttpErrorCode::UrlMalformed, etc... -auto errorCode = response->errorCode; // 200, 404, etc... -auto responseHeaders = response->headers; // All the headers in a special case-insensitive unordered_map of (string, string) -auto body = response->body; // All the bytes from the response as an std::string -auto errorMsg = response->errorMsg; // Descriptive error message in case of failure -auto uploadSize = response->uploadSize; // Byte count of uploaded data -auto downloadSize = response->downloadSize; // Byte count of downloaded data - -// -// Asynchronous Request -// -bool async = true; -HttpClient httpClient(async); -auto args = httpClient.createRequest(url, HttpClient::kGet); - -// If you define a chunk callback it will be called repeteadly with the -// incoming data. This allows to process data on the go or write it to disk -// instead of accumulating the data in memory. -args.onChunkCallback = [](const std::string& data) -{ - // process data -}; - -// Push the request to a queue, -bool ok = httpClient.performRequest(args, [](const HttpResponsePtr& response) - { - // This callback execute in a background thread. Make sure you uses appropriate protection such as mutex - auto statusCode = response->statusCode; // acess results - - // response->body is empty if onChunkCallback was used - } -); - -// ok will be false if your httpClient is not async - -// A request in progress can be cancelled by setting the cancel flag. It does nothing if the request already completed. -args->cancel = true; -``` - -See this [issue](https://github.com/machinezone/IXWebSocket/issues/209) for links about uploading files with HTTP multipart. - -## HTTP server API - -```cpp -#include - -ix::HttpServer server(port, hostname); - -auto res = server.listen(); -if (!res.first) -{ - std::cerr << res.second << std::endl; - return 1; -} - -server.start(); -server.wait(); -``` - -If you want to handle how requests are processed, implement the setOnConnectionCallback callback, which takes an HttpRequestPtr as input, and returns an HttpResponsePtr. You can look at HttpServer::setDefaultConnectionCallback for a slightly more advanced callback example. - -```cpp -setOnConnectionCallback( - [this](HttpRequestPtr request, - std::shared_ptr connectionState) -> HttpResponsePtr - { - // Build a string for the response - std::stringstream ss; - ss << connectionState->getRemoteIp(); - << " " - << request->method - << " " - << request->uri; - - std::string content = ss.str(); - - return std::make_shared(200, "OK", - HttpErrorCode::Ok, - WebSocketHttpHeaders(), - content); -} -``` - -## TLS support and configuration - -To leverage TLS features, the library must be compiled with the option `USE_TLS=1`. - -If you are using OpenSSL, try to be on a version higher than 1.1.x as there there are thread safety problems with 1.0.x. - -Then, secure sockets are automatically used when connecting to a `wss://*` url. - -Additional TLS options can be configured by passing a `ix::SocketTLSOptions` instance to the -`setTLSOptions` on `ix::WebSocket` (or `ix::WebSocketServer` or `ix::HttpServer`) - -```cpp -webSocket.setTLSOptions({ - .certFile = "path/to/cert/file.pem", - .keyFile = "path/to/key/file.pem", - .caFile = "path/to/trust/bundle/file.pem", // as a file, or in memory buffer in PEM format - .tls = true // required in server mode -}); -``` - -Specifying `certFile` and `keyFile` configures the certificate that will be used to communicate with TLS peers. - -On a client, this is only necessary for connecting to servers that require a client certificate. - -On a server, this is necessary for TLS support. - -Specifying `caFile` configures the trusted roots bundle file (in PEM format) that will be used to verify peer certificates. - - The special value of `SYSTEM` (the default) indicates that the system-configured trust bundle should be used; this is generally what you want when connecting to any publicly exposed API/server. - - The special value of `NONE` can be used to disable peer verification; this is only recommended to rule out certificate verification when testing connectivity. - - If the value contain the special value `-----BEGIN CERTIFICATE-----`, the value will be read from memory, and not from a file. This is convenient on platforms like Android where reading / writing to the file system can be challenging without proper permissions, or without knowing the location of a temp directory. - -For a client, specifying `caFile` can be used if connecting to a server that uses a self-signed cert, or when using a custom CA in an internal environment. - -For a server, specifying `caFile` implies that: -1. You require clients to present a certificate -1. It must be signed by one of the trusted roots in the file - -By default, a destination's hostname is always validated against the certificate that it presents. To accept certificates with any hostname, set `ix::SocketTLSOptions::disable_hostname_validation` to `true`. diff --git a/3rdparty/ixwebsocket/docs/ws.md b/3rdparty/ixwebsocket/docs/ws.md deleted file mode 100644 index 348e2ba..0000000 --- a/3rdparty/ixwebsocket/docs/ws.md +++ /dev/null @@ -1,308 +0,0 @@ -## General - -ws is a command line tool that should exercise most of the IXWebSocket code, and provide example code. - -``` -ws is a websocket tool -Usage: ws [OPTIONS] SUBCOMMAND - -Options: - -h,--help Print this help message and exit - -Subcommands: - send Send a file - receive Receive a file - transfer Broadcasting server - connect Connect to a remote server - chat Group chat - echo_server Echo server - broadcast_server Broadcasting server - ping Ping pong - curl HTTP Client - httpd HTTP server -``` - -## curl - -The curl subcommand try to be compatible with the curl syntax, to fetch http pages. - -Making a HEAD request with the -I parameter. - -``` -$ ws curl -I https://www.google.com/ - -Accept-Ranges: none -Alt-Svc: quic=":443"; ma=2592000; v="46,43",h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000 -Cache-Control: private, max-age=0 -Content-Type: text/html; charset=ISO-8859-1 -Date: Tue, 08 Oct 2019 21:36:57 GMT -Expires: -1 -P3P: CP="This is not a P3P policy! See g.co/p3phelp for more info." -Server: gws -Set-Cookie: NID=188=ASwfz8GrXQrHCLqAz-AndLOMLcz0rC9yecnf3h0yXZxRL3rTufTU_GDDwERp7qQL7LZ_EB8gCRyPXGERyOSAgaqgnrkoTmvWrwFemRLMaOZ896GrHobi5fV7VLklnSG2w48Gj8xMlwxfP7Z-bX-xR9UZxep1tHM6UmFQdD_GkBE; expires=Wed, 08-Apr-2020 21:36:57 GMT; path=/; domain=.google.com; HttpOnly -Transfer-Encoding: chunked -Vary: Accept-Encoding -X-Frame-Options: SAMEORIGIN -X-XSS-Protection: 0 -Upload size: 143 -Download size: 0 -Status: 200 -``` - -Making a POST request with the -F parameter. - -``` -$ ws curl -F foo=bar https://httpbin.org/post -foo: bar -Downloaded 438 bytes out of 438 -Access-Control-Allow-Credentials: true -Access-Control-Allow-Origin: * -Connection: keep-alive -Content-Encoding: -Content-Length: 438 -Content-Type: application/json -Date: Tue, 08 Oct 2019 21:47:54 GMT -Referrer-Policy: no-referrer-when-downgrade -Server: nginx -X-Content-Type-Options: nosniff -X-Frame-Options: DENY -X-XSS-Protection: 1; mode=block -Upload size: 219 -Download size: 438 -Status: 200 -payload: { - "args": {}, - "data": "", - "files": {}, - "form": { - "foo": "bar" - }, - "headers": { - "Accept": "*/*", - "Content-Length": "7", - "Content-Type": "application/x-www-form-urlencoded", - "Host": "httpbin.org", - "User-Agent": "ixwebsocket/7.0.0 macos ssl/OpenSSL OpenSSL 1.0.2q 20 Nov 2018 zlib 1.2.11" - }, - "json": null, - "origin": "155.94.127.118, 155.94.127.118", - "url": "https://httpbin.org/post" -} -``` - -Passing in a custom header with -H. - -``` -$ ws curl -F foo=bar -H 'my_custom_header: baz' https://httpbin.org/post -my_custom_header: baz -foo: bar -Downloaded 470 bytes out of 470 -Access-Control-Allow-Credentials: true -Access-Control-Allow-Origin: * -Connection: keep-alive -Content-Encoding: -Content-Length: 470 -Content-Type: application/json -Date: Tue, 08 Oct 2019 21:50:25 GMT -Referrer-Policy: no-referrer-when-downgrade -Server: nginx -X-Content-Type-Options: nosniff -X-Frame-Options: DENY -X-XSS-Protection: 1; mode=block -Upload size: 243 -Download size: 470 -Status: 200 -payload: { - "args": {}, - "data": "", - "files": {}, - "form": { - "foo": "bar" - }, - "headers": { - "Accept": "*/*", - "Content-Length": "7", - "Content-Type": "application/x-www-form-urlencoded", - "Host": "httpbin.org", - "My-Custom-Header": "baz", - "User-Agent": "ixwebsocket/7.0.0 macos ssl/OpenSSL OpenSSL 1.0.2q 20 Nov 2018 zlib 1.2.11" - }, - "json": null, - "origin": "155.94.127.118, 155.94.127.118", - "url": "https://httpbin.org/post" -} -``` - -## connect - -The connect command connects to a websocket endpoint, and starts an interactive prompt. Line editing, such as using the direction keys to fetch the last thing you tried to type) is provided. That command is pretty useful to try to send random data to an endpoint and verify that the service handles it with grace (such as sending invalid json). - -``` -ws connect wss://echo.websocket.org -Type Ctrl-D to exit prompt... -Connecting to url: wss://echo.websocket.org -> ws_connect: connected -Uri: / -Handshake Headers: -Connection: Upgrade -Date: Tue, 08 Oct 2019 21:38:44 GMT -Sec-WebSocket-Accept: 2j6LBScZveqrMx1W/GJkCWvZo3M= -sec-websocket-extensions: -Server: Kaazing Gateway -Upgrade: websocket -Received ping -Received ping -Received ping -Hello world ! -> Received 13 bytes -ws_connect: received message: Hello world ! -> Hello world ! -> Received 13 bytes -ws_connect: received message: Hello world ! -``` - -``` -ws connect 'ws://jeanserge.com/v2?appkey=_pubsub' -Type Ctrl-D to exit prompt... -Connecting to url: ws://jeanserge.com/v2?appkey=_pubsub -> ws_connect: connected -Uri: /v2?appkey=_pubsub -Handshake Headers: -Connection: Upgrade -Date: Tue, 08 Oct 2019 21:45:28 GMT -Sec-WebSocket-Accept: LYHmjh9Gsu/Yw7aumQqyPObOEV4= -Sec-WebSocket-Extensions: permessage-deflate; server_max_window_bits=15; client_max_window_bits=15 -Server: Python/3.7 websockets/8.0.2 -Upgrade: websocket -bababababababab -> ws_connect: connection closed: code 1000 reason - -ws_connect: connected -Uri: /v2?appkey=_pubsub -Handshake Headers: -Connection: Upgrade -Date: Tue, 08 Oct 2019 21:45:44 GMT -Sec-WebSocket-Accept: I1rqxdLgTU+opPi5/zKPBTuXdLw= -Sec-WebSocket-Extensions: permessage-deflate; server_max_window_bits=15; client_max_window_bits=15 -Server: Python/3.7 websockets/8.0.2 -Upgrade: websocket -``` - -It is possible to pass custom HTTP header when doing the connection handshake, -the remote server might process them to implement a simple authorization -scheme. - -``` -src$ ws connect -H Authorization:supersecret ws://localhost:8008 -Type Ctrl-D to exit prompt... -[2020-12-17 22:35:08.732] [info] Authorization: supersecret -Connecting to url: ws://localhost:8008 -> [2020-12-17 22:35:08.736] [info] ws_connect: connected -[2020-12-17 22:35:08.736] [info] Uri: / -[2020-12-17 22:35:08.736] [info] Headers: -[2020-12-17 22:35:08.736] [info] Connection: Upgrade -[2020-12-17 22:35:08.736] [info] Sec-WebSocket-Accept: 2yaTFcdwn8KL6IzSMj2u6Le7KTg= -[2020-12-17 22:35:08.736] [info] Sec-WebSocket-Extensions: permessage-deflate; server_max_window_bits=15; client_max_window_bits=15 -[2020-12-17 22:35:08.736] [info] Server: ixwebsocket/11.0.4 macos ssl/SecureTransport zlib 1.2.11 -[2020-12-17 22:35:08.736] [info] Upgrade: websocket -[2020-12-17 22:35:08.736] [info] Received 25 bytes -ws_connect: received message: Authorization suceeded! -[2020-12-17 22:35:08.736] [info] Received pong ixwebsocket::heartbeat::30s::0 -hello -> [2020-12-17 22:35:25.157] [info] Received 7 bytes -ws_connect: received message: hello -``` - -If the wrong header is passed in, the server would close the connection with a custom close code (>4000, and <4999). - -``` -[2020-12-17 22:39:37.044] [info] Upgrade: websocket -ws_connect: connection closed: code 4001 reason Permission denied -``` - -## echo server - -The ws echo server will respond what the client just sent him. If we use the -simple --http_authorization_header we can enforce that client need to pass a -special value in the Authorization header to connect. - -``` -$ ws echo_server --http_authorization_header supersecret -[2020-12-17 22:35:06.192] [info] Listening on 127.0.0.1:8008 -[2020-12-17 22:35:08.735] [info] New connection -[2020-12-17 22:35:08.735] [info] remote ip: 127.0.0.1 -[2020-12-17 22:35:08.735] [info] id: 0 -[2020-12-17 22:35:08.735] [info] Uri: / -[2020-12-17 22:35:08.735] [info] Headers: -[2020-12-17 22:35:08.735] [info] Authorization: supersecret -[2020-12-17 22:35:08.735] [info] Connection: Upgrade -[2020-12-17 22:35:08.735] [info] Host: localhost:8008 -[2020-12-17 22:35:08.735] [info] Sec-WebSocket-Extensions: permessage-deflate; server_max_window_bits=15; client_max_window_bits=15 -[2020-12-17 22:35:08.735] [info] Sec-WebSocket-Key: eFF2Gf25dC7eC15Ab1135G== -[2020-12-17 22:35:08.735] [info] Sec-WebSocket-Version: 13 -[2020-12-17 22:35:08.735] [info] Upgrade: websocket -[2020-12-17 22:35:08.735] [info] User-Agent: ixwebsocket/11.0.4 macos ssl/SecureTransport zlib 1.2.11 -[2020-12-17 22:35:25.157] [info] Received 7 bytes -``` - -## Websocket proxy - -``` -ws proxy_server --remote_host ws://127.0.0.1:9000 -v -Listening on 127.0.0.1:8008 -``` - -If you connect to ws://127.0.0.1:8008, the proxy will connect to ws://127.0.0.1:9000 and pass all traffic to this server. - -You can also use a more complex setup if you want to redirect to different websocket servers based on the hostname your client is trying to connect to. If you have multiple CNAME aliases that point to the same server. - -A JSON config file is used to express that mapping ; here connecting to echo.jeanserge.com will proxy the client to ws://localhost:8008 on the local machine (which actually runs ws echo_server), while connecting to bavarde.jeanserge.com will proxy the client to ws://localhost:5678 where a cobra python server is running. As a side note you will need a wildcard SSL certificate if you want to have SSL enabled on that machine. - -``` -echo.jeanserge.com=ws://localhost:8008 -bavarde.jeanserge.com=ws://localhost:5678 -``` -The --config_path option is required to instruct ws proxy_server to read that file. - -``` -ws proxy_server --config_path proxyConfig.json --port 8765 -``` - -## File transfer - -``` -# Start transfer server, which is just a broadcast server at this point -ws transfer # running on port 8080. - -# Start receiver first -ws receive ws://localhost:8080 - -# Then send a file. File will be received and written to disk by the receiver process -ws send ws://localhost:8080 /file/to/path -``` - -## HTTP Client - -``` -$ ws curl --help -HTTP Client -Usage: ws curl [OPTIONS] url - -Positionals: - url TEXT REQUIRED Connection url - -Options: - -h,--help Print this help message and exit - -d TEXT Form data - -F TEXT Form data - -H TEXT Header - --output TEXT Output file - -I Send a HEAD request - -L Follow redirects - --max-redirects INT Max Redirects - -v Verbose - -O Save output to disk - --compress Enable gzip compression - --connect-timeout INT Connection timeout - --transfer-timeout INT Transfer timeout -``` diff --git a/3rdparty/ixwebsocket/httpd.cpp b/3rdparty/ixwebsocket/httpd.cpp deleted file mode 100644 index b1e580f..0000000 --- a/3rdparty/ixwebsocket/httpd.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * httpd.cpp - * Author: Benjamin Sergeant - * Copyright (c) 2020 Machine Zone, Inc. All rights reserved. - * - * Buid with make httpd - */ - -#include -#include -#include - -int main(int argc, char** argv) -{ - if (argc != 3) - { - std::cerr << "Usage: " << argv[0] - << " " << std::endl; - std::cerr << " " << argv[0] << " 9090 127.0.0.1" << std::endl; - std::cerr << " " << argv[0] << " 9090 0.0.0.0" << std::endl; - return 1; - } - - int port; - std::stringstream ss; - ss << argv[1]; - ss >> port; - std::string hostname(argv[2]); - - std::cout << "Listening on " << hostname - << ":" << port << std::endl; - - ix::HttpServer server(port, hostname); - - auto res = server.listen(); - if (!res.first) - { - std::cout << res.second << std::endl; - return 1; - } - - server.start(); - server.wait(); - - return 0; -} diff --git a/3rdparty/ixwebsocket/main.cpp b/3rdparty/ixwebsocket/main.cpp deleted file mode 100644 index 8512537..0000000 --- a/3rdparty/ixwebsocket/main.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * main.cpp - * Author: Benjamin Sergeant - * Copyright (c) 2020 Machine Zone, Inc. All rights reserved. - * - * Super simple standalone example. See ws folder, unittest and doc/usage.md for more. - * - * On macOS - * $ mkdir -p build ; cd build ; cmake -DUSE_TLS=1 .. ; make -j ; make install - * $ clang++ --std=c++14 --stdlib=libc++ main.cpp -lixwebsocket -lz -framework Security -framework Foundation - * $ ./a.out - * - * Or use cmake -DBUILD_DEMO=ON option for other platform - */ - -#include -#include -#include -#include - -int main() -{ - // Required on Windows - ix::initNetSystem(); - - // Our websocket object - ix::WebSocket webSocket; - - // Connect to a server with encryption - // See https://machinezone.github.io/IXWebSocket/usage/#tls-support-and-configuration - std::string url("wss://echo.websocket.org"); - webSocket.setUrl(url); - - std::cout << ix::userAgent() << std::endl; - std::cout << "Connecting to " << url << "..." << std::endl; - - // Setup a callback to be fired (in a background thread, watch out for race conditions !) - // when a message or an event (open, close, error) is received - webSocket.setOnMessageCallback([](const ix::WebSocketMessagePtr& msg) - { - if (msg->type == ix::WebSocketMessageType::Message) - { - std::cout << "received message: " << msg->str << std::endl; - std::cout << "> " << std::flush; - } - else if (msg->type == ix::WebSocketMessageType::Open) - { - std::cout << "Connection established" << std::endl; - std::cout << "> " << std::flush; - } - else if (msg->type == ix::WebSocketMessageType::Error) - { - // Maybe SSL is not configured properly - std::cout << "Connection error: " << msg->errorInfo.reason << std::endl; - std::cout << "> " << std::flush; - } - } - ); - - // Now that our callback is setup, we can start our background thread and receive messages - webSocket.start(); - - // Send a message to the server (default to TEXT mode) - webSocket.send("hello world"); - - // Display a prompt - std::cout << "> " << std::flush; - - std::string text; - // Read text from the console and send messages in text mode. - // Exit with Ctrl-D on Unix or Ctrl-Z on Windows. - while (std::getline(std::cin, text)) - { - webSocket.send(text); - std::cout << "> " << std::flush; - } - - return 0; -} diff --git a/3rdparty/ixwebsocket/makefile.dev b/3rdparty/ixwebsocket/makefile.dev deleted file mode 100644 index f6967e9..0000000 --- a/3rdparty/ixwebsocket/makefile.dev +++ /dev/null @@ -1,228 +0,0 @@ -# -# This makefile is used for convenience, and wrap simple cmake commands -# You don't need to use it as an end user, it is more for developer. -# -# * work with docker (linux build) -# * execute the unittest -# -# The default target will install ws, the command line tool coming with -# IXWebSocket into /usr/local/bin -# -# -all: brew - -install: brew - --DCMAKE_INSTALL_PREFIX=/opt/homebrew - -# Use -DCMAKE_INSTALL_PREFIX= to install into another location -# on osx it is good practice to make /usr/local user writable -# sudo chown -R `whoami`/staff /usr/local -# -# Those days (since Apple Silicon mac shipped), on macOS homebrew installs in /opt/homebrew, and /usr/local is readonly -# -# Release, Debug, MinSizeRel, RelWithDebInfo are the build types -# -# Default rule does not use python as that requires first time users to have Python3 installed -# -brew: -ifeq ($(shell uname),Darwin) - mkdir -p build && (cd build ; cmake -GNinja -DCMAKE_INSTALL_PREFIX=/opt/homebrew -DCMAKE_UNITY_BUILD=OFF -DCMAKE_INSTALL_MESSAGE=LAZY -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug -DUSE_TLS=1 -DUSE_WS=1 -DUSE_TEST=1 .. ; ninja) -else - mkdir -p build && (cd build ; cmake -GNinja -DCMAKE_UNITY_BUILD=OFF -DCMAKE_INSTALL_MESSAGE=LAZY -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug -DUSE_TLS=1 -DUSE_WS=1 -DUSE_TEST=1 .. ; ninja) -endif - -# Docker default target. We've had problems with OpenSSL and TLS 1.3 (on the -# server side ?) and I can't work-around it easily, so we're using mbedtls on -# Linux for the SSL backend, which works great. -ws_mbedtls_install: - mkdir -p build && (cd build ; cmake -GNinja -DCMAKE_UNITY_BUILD=ON -DCMAKE_INSTALL_MESSAGE=LAZY -DCMAKE_BUILD_TYPE=MinSizeRel -DUSE_ZLIB=OFF -DUSE_TLS=1 -DUSE_WS=1 -DUSE_MBED_TLS=1 .. ; ninja install) - -ws: - mkdir -p build && (cd build ; cmake -GNinja -DCMAKE_INSTALL_MESSAGE=LAZY -DCMAKE_BUILD_TYPE=Debug -DUSE_TLS=1 -DUSE_WS=1 .. && ninja) - -ws_unity: - mkdir -p build && (cd build ; cmake -GNinja -DCMAKE_UNITY_BUILD=ON -DCMAKE_INSTALL_MESSAGE=LAZY -DCMAKE_BUILD_TYPE=Debug -DUSE_TLS=1 -DUSE_WS=1 .. && ninja) - -ws_install: - mkdir -p build && (cd build ; cmake -GNinja -DCMAKE_INSTALL_MESSAGE=LAZY -DCMAKE_BUILD_TYPE=MinSizeRel -DUSE_TLS=1 -DUSE_WS=1 .. -DUSE_TEST=0 && ninja install) - -ws_install_release: - mkdir -p build && (cd build ; cmake -GNinja -DCMAKE_INSTALL_MESSAGE=LAZY -DCMAKE_BUILD_TYPE=MinSizeRel -DUSE_TLS=1 -DUSE_WS=1 .. -DUSE_TEST=0 && ninja install) - -ws_openssl_install: - mkdir -p build && (cd build ; cmake -GNinja -DCMAKE_INSTALL_MESSAGE=LAZY -DCMAKE_BUILD_TYPE=Debug -DUSE_TLS=1 -DUSE_WS=1 -DUSE_OPEN_SSL=1 .. ; ninja install) - -ws_mbedtls: - mkdir -p build && (cd build ; cmake -DCMAKE_INSTALL_MESSAGE=LAZY -DCMAKE_BUILD_TYPE=Debug -DUSE_TLS=1 -DUSE_WS=1 -DUSE_MBED_TLS=1 .. ; ninja) - -ws_no_ssl: - mkdir -p build && (cd build ; cmake -DCMAKE_INSTALL_MESSAGE=LAZY -DCMAKE_BUILD_TYPE=Debug -DUSE_WS=1 .. ; ninja) - -ws_no_python: - mkdir -p build && (cd build ; cmake -DCMAKE_INSTALL_MESSAGE=LAZY -DCMAKE_BUILD_TYPE=MinSizeRel -DUSE_TLS=1 -DUSE_WS=1 .. ; ninja install) - -uninstall: - xargs rm -fv < build/install_manifest.txt - -tag: - git tag v"`sh tools/extract_version.sh`" - -xcode: - cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_TLS=1 -DUSE_WS=1 -DUSE_TEST=1 -GXcode && open ixwebsocket.xcodeproj - -xcode_openssl: - cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_TLS=1 -DUSE_WS=1 -DUSE_TEST=1 -DUSE_OPEN_SSL=1 -GXcode && open ixwebsocket.xcodeproj - -.PHONY: docker - -NAME := ${DOCKER_REPO}/ws -TAG := $(shell sh tools/extract_version.sh) -IMG := ${NAME}:${TAG} -LATEST := ${NAME}:latest -BUILD := ${NAME}:build - -print_version: - @echo 'IXWebSocket version =>' ${TAG} - -set_version: - sh tools/update_version.sh ${VERSION} - -docker_test: - docker build -f docker/Dockerfile.debian -t bsergean/ixwebsocket_test:build . - -docker: - git clean -dfx - docker build -t ${IMG} . - docker tag ${IMG} ${BUILD} - -docker_push: - docker tag ${IMG} ${LATEST} - docker push ${LATEST} - docker push ${IMG} - -deploy: docker docker_push - -run: - docker run --cap-add sys_ptrace --entrypoint=sh -it bsergean/ws:build - -# this is helpful to remove trailing whitespaces -trail: - sh third_party/remote_trailing_whitespaces.sh - -format: - clang-format -i `find test ixwebsocket ws -name '*.cpp' -o -name '*.h'` - -# That target is used to start a node server, but isn't required as we have -# a builtin C++ server started in the unittest now -test_server: - (cd test && npm i ws && node broadcast-server.js) - -test: - mkdir -p build && (cd build ; cmake -GNinja -DCMAKE_INSTALL_MESSAGE=LAZY -DCMAKE_UNITY_BUILD=ON -DCMAKE_BUILD_TYPE=Debug -DUSE_TLS=1 -DUSE_TEST=1 ..) - (cd build ; ninja) - (cd build ; ninja -v test) - -test_asan: - mkdir -p build && (cd build ; cmake -GNinja -DCMAKE_INSTALL_MESSAGE=LAZY -DCMAKE_UNITY_BUILD=ON -DCMAKE_BUILD_TYPE=Debug -DUSE_TLS=1 -DUSE_TEST=1 .. -DCMAKE_C_FLAGS="-fsanitize=address -fno-omit-frame-pointer" -DCMAKE_CXX_FLAGS="-fsanitize=address -fno-omit-frame-pointer") - (cd build ; ninja) - (cd build ; ctest -V .) - -test_tsan_mbedtls: - mkdir -p build && (cd build ; cmake -GNinja -DCMAKE_INSTALL_MESSAGE=LAZY -DCMAKE_UNITY_BUILD=ON -DCMAKE_BUILD_TYPE=Debug -DUSE_TLS=1 -DUSE_MBED_TLS=1 -DUSE_TEST=1 .. -DCMAKE_C_FLAGS="-fsanitize=thread -fno-omit-frame-pointer" -DCMAKE_CXX_FLAGS="-fsanitize=thread -fno-omit-frame-pointer") - (cd build ; ninja) - (cd build ; ninja test) - -test_tsan_openssl: - mkdir -p build && (cd build ; cmake -GNinja -DCMAKE_INSTALL_MESSAGE=LAZY -DCMAKE_UNITY_BUILD=ON DCMAKE_BUILD_TYPE=Debug -DUSE_TLS=1 -DUSE_OPENS_SSL=1 -DUSE_TEST=1 .. -DCMAKE_C_FLAGS="-fsanitize=thread -fno-omit-frame-pointer" -DCMAKE_CXX_FLAGS="-fsanitize=thread -fno-omit-frame-pointer") - (cd build ; ninja) - (cd build ; ninja test) - -test_tsan_sectransport: - mkdir -p build && (cd build ; cmake -GNinja -DCMAKE_INSTALL_MESSAGE=LAZY -DCMAKE_UNITY_BUILD=ON -DCMAKE_BUILD_TYPE=Debug -DUSE_TLS=1 -DUSE_OPENS_SSL=1 -DUSE_TEST=1 .. -DCMAKE_C_FLAGS="-fsanitize=thread -fno-omit-frame-pointer" -DCMAKE_CXX_FLAGS="-fsanitize=thread -fno-omit-frame-pointer") - (cd build ; ninja) - (cd build ; ninja test) - -ws_test: ws - (cd ws ; env DEBUG=1 PATH=../ws/build:$$PATH bash test_ws.sh) - -autobahn_report: - cp -rvf ~/sandbox/reports/clients/* ../bsergean.github.io/IXWebSocket/autobahn/ - -httpd: - clang++ --std=c++14 --stdlib=libc++ -o ixhttpd httpd.cpp \ - ixwebsocket/IXSelectInterruptFactory.cpp \ - ixwebsocket/IXCancellationRequest.cpp \ - ixwebsocket/IXSocketTLSOptions.cpp \ - ixwebsocket/IXUserAgent.cpp \ - ixwebsocket/IXDNSLookup.cpp \ - ixwebsocket/IXBench.cpp \ - ixwebsocket/IXWebSocketHttpHeaders.cpp \ - ixwebsocket/IXSelectInterruptPipe.cpp \ - ixwebsocket/IXHttp.cpp \ - ixwebsocket/IXSocketConnect.cpp \ - ixwebsocket/IXSocket.cpp \ - ixwebsocket/IXSocketServer.cpp \ - ixwebsocket/IXNetSystem.cpp \ - ixwebsocket/IXHttpServer.cpp \ - ixwebsocket/IXSocketFactory.cpp \ - ixwebsocket/IXConnectionState.cpp \ - ixwebsocket/IXUrlParser.cpp \ - ixwebsocket/IXSelectInterrupt.cpp \ - ixwebsocket/IXSetThreadName.cpp \ - -lz - -httpd_linux: - g++ --std=c++14 -o ixhttpd httpd.cpp -Iixwebsocket \ - ixwebsocket/IXSelectInterruptFactory.cpp \ - ixwebsocket/IXCancellationRequest.cpp \ - ixwebsocket/IXSocketTLSOptions.cpp \ - ixwebsocket/IXUserAgent.cpp \ - ixwebsocket/IXDNSLookup.cpp \ - ixwebsocket/IXBench.cpp \ - ixwebsocket/IXWebSocketHttpHeaders.cpp \ - ixwebsocket/IXSelectInterruptPipe.cpp \ - ixwebsocket/IXHttp.cpp \ - ixwebsocket/IXSocketConnect.cpp \ - ixwebsocket/IXSocket.cpp \ - ixwebsocket/IXSocketServer.cpp \ - ixwebsocket/IXNetSystem.cpp \ - ixwebsocket/IXHttpServer.cpp \ - ixwebsocket/IXSocketFactory.cpp \ - ixwebsocket/IXConnectionState.cpp \ - ixwebsocket/IXUrlParser.cpp \ - ixwebsocket/IXSelectInterrupt.cpp \ - ixwebsocket/IXSetThreadName.cpp \ - -lz -lpthread - cp -f ixhttpd /usr/local/bin - -# For the fork that is configured with appveyor -rebase_upstream: - git fetch upstream - git checkout master - git reset --hard upstream/master - git push origin master --force - -# Legacy target -install_cmake_for_linux: - mkdir -p /tmp/cmake - (cd /tmp/cmake ; curl -L -O https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.tar.gz ; tar zxf cmake-3.14.0-Linux-x86_64.tar.gz) - -# python -m venv venv -# source venv/bin/activate -# pip install mkdocs -doc: - mkdocs gh-deploy - -change: format - vim ixwebsocket/IXWebSocketVersion.h docs/CHANGELOG.md - -change_no_format: - vim ixwebsocket/IXWebSocketVersion.h docs/CHANGELOG.md - -commit: - git commit -am "`sh tools/extract_latest_change.sh`" - -.PHONY: test -.PHONY: build -.PHONY: ws diff --git a/3rdparty/ixwebsocket/mkdocs.yml b/3rdparty/ixwebsocket/mkdocs.yml deleted file mode 100644 index 9b8b493..0000000 --- a/3rdparty/ixwebsocket/mkdocs.yml +++ /dev/null @@ -1 +0,0 @@ -site_name: IXWebSocket diff --git a/3rdparty/ixwebsocket/test/.certs/selfsigned-client-crt.pem b/3rdparty/ixwebsocket/test/.certs/selfsigned-client-crt.pem deleted file mode 100644 index 10dfd91..0000000 --- a/3rdparty/ixwebsocket/test/.certs/selfsigned-client-crt.pem +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDQTCCAimgAwIBAgIUNJBwOQdDle1TI/MHGd+cSpxIllwwDQYJKoZIhvcNAQEL -BQAwSDEUMBIGA1UECgwLbWFjaGluZXpvbmUxFDASBgNVBAoMC0lYV2ViU29ja2V0 -MRowGAYDVQQDDBFzZWxmc2lnbmVkLWNsaWVudDAeFw0yMDAzMTIyMzA0MzdaFw0y -MTAzMTIyMzA0MzdaMEgxFDASBgNVBAoMC21hY2hpbmV6b25lMRQwEgYDVQQKDAtJ -WFdlYlNvY2tldDEaMBgGA1UEAwwRc2VsZnNpZ25lZC1jbGllbnQwggEiMA0GCSqG -SIb3DQEBAQUAA4IBDwAwggEKAoIBAQC7q6W0f5vRSHaNOuM1VQpY0rC0a5u04J5Z -nssUD1QfgilY1UEaaR/4K6ILE4oClqeDsQy/7+04Wt6i/ttceB/k1Jk6n0kgdtvA -CsX1H+nA7JL7ANBZvQ6W2E1mwJieTDSVDgL4YB9qzJQu3PdwZJgm5GTlVK66DMr1 -IH2EYwu73M/ZwOzfgyd7m0TcgkRV8OHiD1dVDERNQR9gzDUsBtCoWPmzXxgPMOSE -Oq1sEhNC0bPaG3zTDvCv0t4Hti33po/U8PZwOtz2b8StSjS5BnvEDnksAtEZuNEu -4B3KJN4Oxrtgh7DYdiF7S9Gh0dN6yqtRfDWkGyC9WkyoqpFKCM4fAgMBAAGjIzAh -MB8GA1UdEQQYMBaCCWxvY2FsaG9zdIIJMTI3LjAuMC4xMA0GCSqGSIb3DQEBCwUA -A4IBAQB4oIutDYbCRfsyWRAiAY+D9rhYsJYlsQjyml1q2+pCv7BJ1kWsKk7m2VMX -Tl6CM+PI0zXPpLN6Ot79jf/jxEbDMvqrBgGpYfddvLhyTFnzIZpG8d63RvzPADF6 -lV3x34eZf/EdtrWgZAHK+5oZjtzePGHwKDFIPva9nvJXYIxNwKYWGRX8HSm0OZi2 -FQiaOt6WYLo7ZdefNPS9nugFRM6hfztJe6WvvglKm+BTnHbCSKj5xRuT9iA80+jX -Zij7po8opY3S+zEZ0eNUCHxMBQ+2Jdq3HxggJ2cFQVRHdvKfwzmavVeGgni75d16 -+xFD5nS3g3eIEME+lZ8c8GbL0AJ4 ------END CERTIFICATE----- diff --git a/3rdparty/ixwebsocket/test/.certs/selfsigned-client-key.pem b/3rdparty/ixwebsocket/test/.certs/selfsigned-client-key.pem deleted file mode 100644 index c319e09..0000000 --- a/3rdparty/ixwebsocket/test/.certs/selfsigned-client-key.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAu6ultH+b0Uh2jTrjNVUKWNKwtGubtOCeWZ7LFA9UH4IpWNVB -Gmkf+CuiCxOKApang7EMv+/tOFreov7bXHgf5NSZOp9JIHbbwArF9R/pwOyS+wDQ -Wb0OlthNZsCYnkw0lQ4C+GAfasyULtz3cGSYJuRk5VSuugzK9SB9hGMLu9zP2cDs -34Mne5tE3IJEVfDh4g9XVQxETUEfYMw1LAbQqFj5s18YDzDkhDqtbBITQtGz2ht8 -0w7wr9LeB7Yt96aP1PD2cDrc9m/ErUo0uQZ7xA55LALRGbjRLuAdyiTeDsa7YIew -2HYhe0vRodHTesqrUXw1pBsgvVpMqKqRSgjOHwIDAQABAoIBAQC2q7IESj2x7TWv -7ITiEZ+bq6DiTOfnnMeldkI3iWAZt0lltVXETlUW6+mznFY2hMwTDE/bt78Qnqqc -vzNoA2kQBLwNaqP0XJ0zhYkAOwr9hYjflwA2iSZdP7e/b3JeitCX0WakunN6Mh1+ -rAiRtui+2os3CkF0yST4iqKCLSJrvSvvK5fU92aKEaE3k9kznBljvVOJIIRQBUPz -G8tvtPgpLALrT7XMnGfaCyGS8c1IbFMm84KTxAlVV0bnuGgeYQ2VupqUmZpJjcJ0 -B08hr7vPfxz3UXSOKwYY8TRfmF3X370ky5Ov2I9ddg27V1QoeRTWlL7VMxRtiSer -hoM5SPKpAoGBAO0vBd1Z6425wGT0PClUbJAVm2OBYMDnl2RmhBK5TAxrKjs9ag08 -65jfVCMD8wDMDhEbvbmzkgRa9BC6AY97JBmyr4m9oGfA7oenuou+a9LYAKqtO0ts -hxHf2LnpC1HCyh4+l5gohjlUG7gSVu/oBhNTJNKmqUKuQ8v1b6My/JR9AoGBAMqP -DugL9DusECncKHQbaIEzvEBe+QErcUxXxq+G4LLvFTZVvthHbrZ/0cxm5Ve6rfd2 -krqjYFA3WPOuTcKEUouNeRK2A4V6PbnSdpf0kagN6KbEjK66ZSZs8wnWitghqo7J -n2IHcSDEEACTyjS7K8HjPx0fQGU1tzkG/7/xs3vLAoGAI61JEoyuE/l26TibvBPI -6Lt3TjZt2VZ8vUt2XmKk/9E23wZT533canhdbY7whJQtIYGsvjw2oJUV1VZFWdHK -EluAcBWoBTNOLfWa595S1bpMD2BTZPsELjofnYdifn/wazA7GVYvKnxuVvfbP+cE -0u9UwKL1HuSbqhhXHJNUzvkCgYAeFRLsqWHTPuGDpfuoCq4BijJqCPDIGLCR2vNZ -/BkA2fr3f9KBAlLR7be1uI5U8heGCekOqNbT8vRV9Ev+GHK94PvbKIbrWtUx9KzC -MoMzRyWHJueRx4LgKwwJKQCjypQu8oimIV7Os++AdnJwVF/SQrKL26lPnqOgZ4ax -9e5m8wKBgQCF626EmJk34+WTGEa5gdTx567Y+1EAbag+7fQSskwiRPvRN2fcg3H8 -ynUAtIgWbrecgKhblXxc7zwJrl41P71uQzCFspgvOPXMxL2xqN+tnTfuz84OXk26 -h1xSdS3e+JYsWUIxqbH1W59S+dC7KtklBAcUxb8DNpDoVjVBeAEqzw== ------END RSA PRIVATE KEY----- diff --git a/3rdparty/ixwebsocket/test/.certs/trusted-ca-crt.pem b/3rdparty/ixwebsocket/test/.certs/trusted-ca-crt.pem deleted file mode 100644 index a1f7576..0000000 --- a/3rdparty/ixwebsocket/test/.certs/trusted-ca-crt.pem +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDYzCCAkugAwIBAgIUD0V1mxoZF9TNpsoyvuHU2zhrg0wwDQYJKoZIhvcNAQEL -BQAwQTEUMBIGA1UECgwLbWFjaGluZXpvbmUxFDASBgNVBAoMC0lYV2ViU29ja2V0 -MRMwEQYDVQQDDAp0cnVzdGVkLWNhMB4XDTIwMDMxMjIzMDQzN1oXDTMwMDMxMDIz -MDQzN1owQTEUMBIGA1UECgwLbWFjaGluZXpvbmUxFDASBgNVBAoMC0lYV2ViU29j -a2V0MRMwEQYDVQQDDAp0cnVzdGVkLWNhMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A -MIIBCgKCAQEAr2nVpfIzxsxK76Va+HaBfZ7aqjk90zipzH3/CWuMMN9wzBhg2HPE -cRreq1vKm2M/L9CZH6y6fnr68n8lW4rDATmbH0GeY4OqI9jw/mfjL4jUsAxwRi4X -kkk4G2nz1G81LvWLFXXAZlOxeHSZtpPh5OP1tNGiJNL4eGVxjlwFJIFwDvweJ/tW -J7dh/FTzO0jqh8FheJTeJO64Gflqfln64WRUOPSpO7v4KmyesM/BGwGMfZjcwhs/ -KZT+OKXpPgYhdmAZJE24ftwWTP84DP9wnJbNqTRt0r5ud+q8EusKIjw/Pbf/tPUF -7J0bkMp4y5/+7MMuIxeZ+s2uHdp6hmwdJQIDAQABo1MwUTAdBgNVHQ4EFgQUPARq -Vm19yGgWqEnpNT1ILIkfWhEwHwYDVR0jBBgwFoAUPARqVm19yGgWqEnpNT1ILIkf -WhEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAEIsTvJhs6r2r -x1xrHKaGo4sSuywJiZqMabvC9g22Xw3Cno5qGVFYWi4k0qjX/j9DN36DyOY1rei+ -kNBnOnLdtdNDltcvaLeA/9SeIhxRYOwjXpPzy9AqHpGZPui988qtptA+DI+IOLAm -mQyssYC4doDcohMXaI7KumKHojTDAPrF2INJRTF9zWgbsFjvSWU5CY5CNERWCydh -OXfzFylifScNOppioZL9VTa6At7R+MGg834kMi6WDIvtD6Ibn+pw0bV60aiMhBe8 -8qgZ8lxjGOHlvQrjqdk65smhfaECJcFJxybOSA3Z1f+Y9j/p0e0hyUJM/b/NouaE -64H6vXczLQ== ------END CERTIFICATE----- diff --git a/3rdparty/ixwebsocket/test/.certs/trusted-ca-crt.srl b/3rdparty/ixwebsocket/test/.certs/trusted-ca-crt.srl deleted file mode 100644 index 4fa18e7..0000000 --- a/3rdparty/ixwebsocket/test/.certs/trusted-ca-crt.srl +++ /dev/null @@ -1 +0,0 @@ -297E3BFAD1F1F96A60A2AF0F48B092E705C0C68A diff --git a/3rdparty/ixwebsocket/test/.certs/trusted-ca-key.pem b/3rdparty/ixwebsocket/test/.certs/trusted-ca-key.pem deleted file mode 100644 index 5f6dd36..0000000 --- a/3rdparty/ixwebsocket/test/.certs/trusted-ca-key.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAr2nVpfIzxsxK76Va+HaBfZ7aqjk90zipzH3/CWuMMN9wzBhg -2HPEcRreq1vKm2M/L9CZH6y6fnr68n8lW4rDATmbH0GeY4OqI9jw/mfjL4jUsAxw -Ri4Xkkk4G2nz1G81LvWLFXXAZlOxeHSZtpPh5OP1tNGiJNL4eGVxjlwFJIFwDvwe -J/tWJ7dh/FTzO0jqh8FheJTeJO64Gflqfln64WRUOPSpO7v4KmyesM/BGwGMfZjc -whs/KZT+OKXpPgYhdmAZJE24ftwWTP84DP9wnJbNqTRt0r5ud+q8EusKIjw/Pbf/ -tPUF7J0bkMp4y5/+7MMuIxeZ+s2uHdp6hmwdJQIDAQABAoIBAH4sPkUTJjMEl5Iw -+nJlq1bUgKyYZ+QaiehRaLU56qjsz5G+p0qKWu6QSUIw0Fdc2AJopPunnq2DgCYV -VqW19fZXnUCqTmd+OU93qEEWMM/sODA5gji4xrOufvEZEQ3ov/R7IgPZov73jFv8 -YuR1ErM1VXMuptad+aOANGIVxo0ubDEXKK/zhOfUUXQy7ZsEruJCCIpigULU159r -sVOq2lwgLz+hClFBIq0IKAKqiPWpw2GtHtU5WtAo3qZEMJkNM5SppjDmS2Wy3qN6 -Gq6sXtlAmLFZAyVpXXklQK3mCaAs5gcV94nm+r++F884obaOtJ126uDdIKlL+A6k -l41DXwECgYEA4KAswbdoa18J1Ql2QtwW3+knEaUO62JH11RO5VV02uiYv4v4mHmA -prnl1jsfgbc3qfIlZWDLlNRovKCfQSj/HzOe4Hd+gEPiSYjA77PRqQeYTPXTf0Ml -IQ3j9z1CdBWNoKJ18CEiIncvjpDYkdFf3RsawcnYXklXRjmm6kIJJzUCgYEAx+oA -gm/xXK28P/CFksZzsseF5i/1MPdniyP3oY34DlEmDvl9ZA1Z52De8vojfNd9X12M -ccjiGMMGgknJqncCB+uTWYFy2pWnr9dVVxf+oirAlT1Z03AkT5gxmIZ3FUQw8VkB -HjKJYD1mpTwoSlc+DR3R0xNdl84nkUI2hxGErDECgYEAjdsZ6MyXGRfP8cYj9V1g -5M8taStAHM7YZ9hKavJo9cZmkLEoscIpySElUQHNh/HZKW5Ox5M1fiwWaOlXKaNm -WqIS99b/AKneQmomzjpVcdXmDNRCWOBilllbWkxJp13lL0jqClgiYnm6guJeotgD -HnN7ll6OUh0nDKZkDxTdCvECgYEAtlQZet2WCKz70GURrjgJNbj7ymFbAvniGekH -5PSSlJw2Vdn+Hs5+fKTBMmIpE6eF1QCBIxXQAD1/Jj0eDLbVx1t33F5P3kQ32AxQ -7UoZFtZfJr35uvnAZEeulCmvWloDOVuvxVbaLEhT4cfoB0VidpwHzrcO2XFQbQ8y -pCW6F0ECgYBbO0NU/Jlu3acIzGwAv69CMo8udwnWrhzGStZD67swdQ/yxHVpx2RH -0sNk6UfLku8Mal7Pp+RglAmsOZEjSgk1V92J9lXYjYD8IUNwNyRRCpQ8xu0KPgDM -XGeUca/Ao7jRVcsPOiqFH7wgfEjyzpO85X/K9BoBnA0EcUTOScaqmw== ------END RSA PRIVATE KEY----- diff --git a/3rdparty/ixwebsocket/test/.certs/trusted-client-crt.pem b/3rdparty/ixwebsocket/test/.certs/trusted-client-crt.pem deleted file mode 100644 index e76067a..0000000 --- a/3rdparty/ixwebsocket/test/.certs/trusted-client-crt.pem +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDNzCCAh+gAwIBAgIUKX47+tHx+Wpgoq8PSLCS5wXAxoowDQYJKoZIhvcNAQEL -BQAwQTEUMBIGA1UECgwLbWFjaGluZXpvbmUxFDASBgNVBAoMC0lYV2ViU29ja2V0 -MRMwEQYDVQQDDAp0cnVzdGVkLWNhMB4XDTIwMDMxMjIzMDQzN1oXDTIxMDMxMjIz -MDQzN1owRTEUMBIGA1UECgwLbWFjaGluZXpvbmUxFDASBgNVBAoMC0lYV2ViU29j -a2V0MRcwFQYDVQQDDA50cnVzdGVkLWNsaWVudDCCASIwDQYJKoZIhvcNAQEBBQAD -ggEPADCCAQoCggEBALijaV0JhdoRAXnD5fX5W/9nZFb6jor6lIGW56Mdn+11ICYw -GoJ7ATnygUwfBMepoD5RfJ5pkNxYewo8N5JR+8rb4V9atJCSYQLT8P7Dm2YNMtkq -mNiRuRLrTqoPYajEzz5ENWSNnsjUB1GMGEpcCvRDgsTF24OsVV9BmLV166BEye7w -ah+jk1YYJHbEnNT4wzr4drJSGEYh2aRO72yY+ROe49Tz/GVVXfCamcj88z5hOS/+ -+nCF/odLLB9Ij4xhR8WwTrwE/TxlkIQRBBPTsNetZjvMQZT+TkKw9nNjdoHiDlz9 -BLOYxovUIB8OtOQQfour8V7nwZ2bL9Pp51mnmBsCAwEAAaMjMCEwHwYDVR0RBBgw -FoIJbG9jYWxob3N0ggkxMjcuMC4wLjEwDQYJKoZIhvcNAQELBQADggEBAFTus7o2 -fQuSMk52qXUESVWG4ygvd2scV58zRrLxZL7Ug9p4DIJo0cY59l3Vhwn2xDSYlAFi -1h/qSEGkR2a0U2LzMK7BPSkqqYceSwnUvnwHvCwgH9aL1Rvk/4f1sFfsKegjScle -wraYsRmpidEZJYICvokHev36mX3fHaZZEU+WIoTvChgu0OtD+qkI4DECywLgtB92 -/geabKC3C5JgiW0Jz8AScWoO2uKHFeuD2nfI1SiAbfMIAmG3RTanbZ8JMEVomVep -txMNGnojun923KTEScnH3cQfnkJjm2AM5yKgT6I/OHELe9Gg7R0IOJbiPmSru7/k -x5tBp3iMsZZ26VE= ------END CERTIFICATE----- diff --git a/3rdparty/ixwebsocket/test/.certs/trusted-client-key.pem b/3rdparty/ixwebsocket/test/.certs/trusted-client-key.pem deleted file mode 100644 index 1205d56..0000000 --- a/3rdparty/ixwebsocket/test/.certs/trusted-client-key.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAuKNpXQmF2hEBecPl9flb/2dkVvqOivqUgZbnox2f7XUgJjAa -gnsBOfKBTB8Ex6mgPlF8nmmQ3Fh7Cjw3klH7ytvhX1q0kJJhAtPw/sObZg0y2SqY -2JG5EutOqg9hqMTPPkQ1ZI2eyNQHUYwYSlwK9EOCxMXbg6xVX0GYtXXroETJ7vBq -H6OTVhgkdsSc1PjDOvh2slIYRiHZpE7vbJj5E57j1PP8ZVVd8JqZyPzzPmE5L/76 -cIX+h0ssH0iPjGFHxbBOvAT9PGWQhBEEE9Ow161mO8xBlP5OQrD2c2N2geIOXP0E -s5jGi9QgHw605BB+i6vxXufBnZsv0+nnWaeYGwIDAQABAoIBAFQ2XAEOLdmW9ghW -fBUjRX2I56/wGYFz5rXwYPf5tA625BHm0MCAX7/RRn20jBaQ3EBwJBmQZnzJclzp -uCLpd6E/hlxaX46s5MhIaFuaVc9G59E653mnhTUG09smptE16pwouf2BxlEsu6XK -8u0/a9Oa0xLydztoJ4wJvB/Ph8eRsbdbfL/ZAe+vk+bEp9ugyec3B5KTc+hWRneH -BRfe239OX4mEhxNoO1tPJz1hJLjJH5F/iE1wkjSzLr1SI/cSbcbnyYj/kyXmktZw -uaeFptkT6rB9GO0YunEPzzuQ4EEPpK9F63uu74dGqyW56STq26km7diAHhEpFdp1 -7X0rfHECgYEA5YPtjdqKEn5pQEdehqFnzi3IIu593o7baM6qEyFpMsTP53QCjUKX -rrImyr2opfFKrXrI0IYXlDgOZApb2sKLoeP/wpfZiGSyqrzj+Y49cNRHjH643ClL -Ri5eO6TRBukAW1gQFwuVBPbcnswaU6Ah85uTxqj+hO0g18rkuVdf72MCgYEAzfHH -lb9TMf4DZEoL7GMpc4gDG9V66UWWzXyJB4CWHd6QX1vl6Ow5wE7q3fewD4SNgvDs -DHZ8oqK2OMKJH/h/tqxyu+g1huajOhPqy1TIt5ncMjS0sguQ+7bQeHASKLxHhjPC -YdqGMxOBQI5olWGq5U9Td5TYE95qk50KoIyNnekCgYEAkhMwa1tPC0w3UrjZuZga -yEetHEZsB+0mSgNWjYxzNuO6atYUFbHvdjlepSSmpM74t4bxLn5ZnXU7+4H4SjgN -xMCm9EPPKJbme/Jyqk9UXW5OB2ZT45PIm+dBBHb2ro43MuvOecxeUOWJLuw6SUUe -trwrBoJiU1nU0GMKxceNgH8CgYEAzeNMpDG9S7ply6qXVwEf3Kd6bCY1leaDR/Wb -zMtJyJzL+vmV1RHs/ownFDfeZPUgwGp5olAGdFV1FTOvAS5fB9JJdgBFGxOS1ao5 -zoN5kswYLn0wtNsJXAy9R9rK3Ly2SL2QNGHSTlfOnSqB9e3JeyyeBmvgxaRTKjYS -/MTng5kCgYAIL79seoBnd9ZSp8A7QUBighxBn6DwrvLgexaysmC0zYqxbatczHk9 -iFbQRmPnFHhUt4URhxyhCoTgd7F0JpxklQODNfseVwtDiDMj8Fu8Tfmn6+9GdFRv -0QEU+dR3gi98bO6G4IuAFGO9emXho3Snu6odRmh4HZVNOdLCuQe1Cw== ------END RSA PRIVATE KEY----- diff --git a/3rdparty/ixwebsocket/test/.certs/trusted-server-crt.pem b/3rdparty/ixwebsocket/test/.certs/trusted-server-crt.pem deleted file mode 100644 index 6d5e9e3..0000000 --- a/3rdparty/ixwebsocket/test/.certs/trusted-server-crt.pem +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDNzCCAh+gAwIBAgIUKX47+tHx+Wpgoq8PSLCS5wXAxokwDQYJKoZIhvcNAQEL -BQAwQTEUMBIGA1UECgwLbWFjaGluZXpvbmUxFDASBgNVBAoMC0lYV2ViU29ja2V0 -MRMwEQYDVQQDDAp0cnVzdGVkLWNhMB4XDTIwMDMxMjIzMDQzN1oXDTIxMDMxMjIz -MDQzN1owRTEUMBIGA1UECgwLbWFjaGluZXpvbmUxFDASBgNVBAoMC0lYV2ViU29j -a2V0MRcwFQYDVQQDDA50cnVzdGVkLXNlcnZlcjCCASIwDQYJKoZIhvcNAQEBBQAD -ggEPADCCAQoCggEBAMK5XAcHJwVSor1SfoMM5H5aNfNnM4JKq8kfAOl6KlXCsgs3 -bBcrJ24gEG6/goxkgLxhC1SXdbebt3Jay2lxAa9/7Uj87yztozSsctMkxXE0u3R+ -ih+9sP7ctpZ1hrF2Gv+ztd49/mXe1iRLPhkPijGpPlNsfie/TYybrw3WQlGH8jUm -MnW12QUOzoBrIOCO6uIxFBJ1qiMq5mIBLlYOMj+MQubnQdvaQPNf1zaZWsCVGyTv -95roHAb/s70Ie4r4ATcubtZs/ftjvzSmJegodTprPAedkrJ/k6Od9as7hpL37605 -haBU5pMyPNMWYi1MwYc9k0R0IpCKdyeX0huHfpkCAwEAAaMjMCEwHwYDVR0RBBgw -FoIJbG9jYWxob3N0ggkxMjcuMC4wLjEwDQYJKoZIhvcNAQELBQADggEBAI41ZI4Z -WbPFB1e+wIWQE7O2rJMeTEImjBOtcJEN3bqhsdE3Zqk0fPaE6jNz0Fp4IXqUYXzo -SGsgBroV6sgknuLo8HdcTLcg8p9qZ3FGFHFQD1QYINn4ykupJZE2KcrIV8BZ/Tiv -ciFrJ7i/qwpOrTRBV/w47yP3WZ3v8UdBnj5URD0v/yaAfkaReDO59Dlht/wyItQi -GkDczMqMF1GTqcLqBwZdfpHq7B/UI8sp58a6eR9lOgryYCr+QJn7TcZrYzkcSWzg -KE6VuzK6+NElvtg1hSST2Rc/RuuKzexsO/PLesVzaU/6NdDwXmpuSxeCiWm1mosA -xfQZ9fSOQG6reFk= ------END CERTIFICATE----- diff --git a/3rdparty/ixwebsocket/test/.certs/trusted-server-key.pem b/3rdparty/ixwebsocket/test/.certs/trusted-server-key.pem deleted file mode 100644 index f7387bd..0000000 --- a/3rdparty/ixwebsocket/test/.certs/trusted-server-key.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAwrlcBwcnBVKivVJ+gwzkflo182czgkqryR8A6XoqVcKyCzds -FysnbiAQbr+CjGSAvGELVJd1t5u3clrLaXEBr3/tSPzvLO2jNKxy0yTFcTS7dH6K -H72w/ty2lnWGsXYa/7O13j3+Zd7WJEs+GQ+KMak+U2x+J79NjJuvDdZCUYfyNSYy -dbXZBQ7OgGsg4I7q4jEUEnWqIyrmYgEuVg4yP4xC5udB29pA81/XNplawJUbJO/3 -mugcBv+zvQh7ivgBNy5u1mz9+2O/NKYl6Ch1Oms8B52Ssn+To531qzuGkvfvrTmF -oFTmkzI80xZiLUzBhz2TRHQikIp3J5fSG4d+mQIDAQABAoIBACFw4dwXH11rpqUq -4K0y7p7AcVl+1LrAhiYBHA/8uf6GdDs25mpIL/paqVfLrejcbbtsUxzQ8hd5N5T9 -AMf371kreB27ynuFyCyInSOjwgDCFJtaC/CNjDMIxpaqUlpxtQtK2qXzMZhfH5mW -DnERWSNUNG7xR+0djnziU7rlm/gSOxUA2gS/5ik9JXAx0yoML7HWlBbk0PJ5o8Ac -sy6w/YwJVZAjXyUuYptPy2bK8WpGAsthw6RmW1fdOdDAUC3wz7TIKLuPD0AP9g7j -u8grDYtD+U3ls1Z1Grow2UUG8CedotzVE8KIhDWi35aNiGIuaMFnnLf2OO/Mgd6G -V82kkLECgYEA4sBtNsmlfFteFmHPS0s8wzg7lzLN15yifk7kO9GQcsbymXVSgU93 -XnvADAflly382pyMpr7Fb6V126iOx+YQhr6ya116S4UtAKq4kCau3Im6OedKefwx -B71rST+vuAlUcv2ZcAVRJK8GtQQvwcAeI24ShPOXC+vyFAaaZ5eZo/0CgYEA29dZ -LcREVlv2Tgy/YJVnZ7EYRGiheuF0rl0d0+Stggj34fSS1cexv3gMF13HBk2HpXfW -3LfJyj2iGRZE9OUjN0ozVIVZWgZS/cwZbEUyl3o6IK0kPE4fZBaE16Onh4OGXKwr -XTG+EjmIJRVRawECbLMONj5rHQLdcy+5YIH28c0CgYEA1XSL2y2MCTsBoVRGDf0v -oB7JihYbTEN5fCnMFLu8nS/HpMqa9nvWRS19plWwvdZe13TTuwyPVACQqE1Oy8M5 -/354+zUuMPWXXa9YuuqPZbCJjIS8yYSsqzqXSocXZcnyo6Uz0g5PSpcxWyorwtqW -BIhUCrA8ms5sPonQxIAj9AkCgYBd/6g7722g11VrbfvuWjOKnKhZp7tUBU6Ut2/n -iCHANgF3ddHK4sXXrobM/uX4hfH4CFOwsEzx0oSa4XC+nbL/ExT7kMDxwz59EmXU -a4oERtjP2/hgaK73ZsGKSol5Yf1zZpJsGLbCqCLUaFcVv6q/u5faDbpS/0Sc2c0T -vL5QCQKBgQCL6ySxvEb5+zst/kRxXcnefXjoB+LSYsU4zy8WfkcP4r38AAQ2Hn+F -f3/9BUX+2gNr99VDMjI+TUEf+NdQA/nFu4RbFvJ9Wpw9pXkIJpJkZ9g3Why4Ziji -h0IrXm5JCet71+EIMwP0LhKJKrXZudlzP4DYMWmA7Avqb3HIdPXd7Q== ------END RSA PRIVATE KEY----- diff --git a/3rdparty/ixwebsocket/test/.certs/untrusted-ca-crt.pem b/3rdparty/ixwebsocket/test/.certs/untrusted-ca-crt.pem deleted file mode 100644 index 2f034c9..0000000 --- a/3rdparty/ixwebsocket/test/.certs/untrusted-ca-crt.pem +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDZzCCAk+gAwIBAgIUBEbp5x1IlwAV6OcQ/4xHk1Y+K4UwDQYJKoZIhvcNAQEL -BQAwQzEUMBIGA1UECgwLbWFjaGluZXpvbmUxFDASBgNVBAoMC0lYV2ViU29ja2V0 -MRUwEwYDVQQDDAx1bnRydXN0ZWQtY2EwHhcNMjAwMzEyMjMwNDM3WhcNMzAwMzEw -MjMwNDM3WjBDMRQwEgYDVQQKDAttYWNoaW5lem9uZTEUMBIGA1UECgwLSVhXZWJT -b2NrZXQxFTATBgNVBAMMDHVudHJ1c3RlZC1jYTCCASIwDQYJKoZIhvcNAQEBBQAD -ggEPADCCAQoCggEBAMmmYROZf/Kg46b/0Zvq4pUY8ghUEA+eYit8dLyUZ/onoW4l -xl3CK5NhJIer62Olv7QIu8WhU/hYoeE+8lLva9v0HaJgGjKmPQ3tyej319PzIc7o -uKatrQ0BAi/KReBQOoqAGqa+DBIGAHoi29x4wZ/ZGSjeVManNb58Lz3+caFlZRCW -8vcrE5J8OcpD+0O/CKM1UJDlTVFSBJS229my5WjxQnfNZeuxRnMxOCah/qaJsZZr -FdRd0th2mRZtpjM8vZfXuoUcK+XVSENuJKdqFR4hXQU5Xq62ofxz+IiToPHO24zi -S1lp7ggeIrgZXaz2I+7LmIy6gnZWP6oXE8XcyW8CAwEAAaNTMFEwHQYDVR0OBBYE -FJLe6w7SsBTwFnIQYjjjH16p/3zDMB8GA1UdIwQYMBaAFJLe6w7SsBTwFnIQYjjj -H16p/3zDMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAGrHNKNe -5UqrNPdIXlGwpabOdrhmAc9yN/tXiB386lByktIeOShS6pvD+UuV14PcTXUFGCwW -2o8I5OE/+O8w+InyWyV7qC7dgeWyEL4qDAuIYmxs71T2VOv/eekYp1Zq/o3kL3hI -f0oxonJVZXkR4p39L4TCS3z6EiWRJxWlI4LVNcvWgkwJB8w7wIxSbql0Y/EO9yoU -07u8QHVj7Nth7YteacOpj8jEy42SuWq5sdW7ccMgEfptRSYiVAmgD7mOCaELCBHz -NVqyLRPkvWqX7apqDy9vR3ZnMiHWEpTPeQqK12GJbVMW53AVEDWKiL0bhrjnY/uS -dwnpMp7fEUJLXQk= ------END CERTIFICATE----- diff --git a/3rdparty/ixwebsocket/test/.certs/untrusted-ca-crt.srl b/3rdparty/ixwebsocket/test/.certs/untrusted-ca-crt.srl deleted file mode 100644 index 7e2278e..0000000 --- a/3rdparty/ixwebsocket/test/.certs/untrusted-ca-crt.srl +++ /dev/null @@ -1 +0,0 @@ -5CB637D0B24622D344F4C956FE5930B22CF87221 diff --git a/3rdparty/ixwebsocket/test/.certs/untrusted-ca-key.pem b/3rdparty/ixwebsocket/test/.certs/untrusted-ca-key.pem deleted file mode 100644 index aeb029b..0000000 --- a/3rdparty/ixwebsocket/test/.certs/untrusted-ca-key.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEAyaZhE5l/8qDjpv/Rm+rilRjyCFQQD55iK3x0vJRn+iehbiXG -XcIrk2Ekh6vrY6W/tAi7xaFT+Fih4T7yUu9r2/QdomAaMqY9De3J6PfX0/Mhzui4 -pq2tDQECL8pF4FA6ioAapr4MEgYAeiLb3HjBn9kZKN5Uxqc1vnwvPf5xoWVlEJby -9ysTknw5ykP7Q78IozVQkOVNUVIElLbb2bLlaPFCd81l67FGczE4JqH+pomxlmsV -1F3S2HaZFm2mMzy9l9e6hRwr5dVIQ24kp2oVHiFdBTlerrah/HP4iJOg8c7bjOJL -WWnuCB4iuBldrPYj7suYjLqCdlY/qhcTxdzJbwIDAQABAoIBAQCWRBLRLTDoWDZs -6vODEczZOGacCDCTwv3609qV8K1u/3tPfnzMv3YDdH9pTpaxggFSIrPyeN7/EOVI -2cRwQxQIK2it6Jl9Jt4WdB1jKtW9js+hxVBcfM2ZBChh/oSFvKNzNDUoDjUmdSyD -11gpeh8ng/s4tj1Mb6wgD6CQvPxmPLsJZ3swxdSFgR5hpXXELtAK+oOlP0Y6SFpi -d5AyiaMP9imBKQV7qgJSiKWVtSAvMhfCOPaeYM9wPCA9nha6dYGC8Fgh9FklOf2+ -fj+0dqmbWwa3xuEBfZ7oS+uKnzzcBvTxtNz/U8b9bPzTtoJU6Z6P3wLIB5x8DgQ3 -NcDqVbtRAoGBAOnEl1hfHsm1Ni0flugvNSY5pRF9CGQjbTk2tQxEfsPc7LiNZxjF -NFyJK2wVs17bsCI4PUO9nnMjnCi86SMKj0ifVoroYlMkt4ruY9iQPTLbrJpTBF/X -LkU77s6TSeOQdzUlVPcIXfTCYwguicpIP6kOcohHplmzdurWtl723GqHAoGBANzT -1G2h8dS7UtR0GRO4u9QM8jhRFszariovI6eOEKPaVhBhPeiwwcWRq40un7koCLzU -WA5CV6h1fGQVvN8pjpZdXYUAa26jlnISQLvNgNvwD2b5UjRi4tH2QuV0LOAMiMGs -vcQtpjM12RNfii/Tdun0mYZ9pcb65T4p5VubM9vZAoGADl4i3y+ZeNRGbCeQ4txj -6+GHH7gLl/wFborKPeLH18nwUrd+KquUOEvF+3Kp/56JCNFkEpHI91Ks+mQCAEFZ -5SDF9Ourf2i2Tzevs1PKLyIJTcLkde+HzIGOf+vVksMCUKXmvvgori50X8Bcf65J -G17j8zRUKRc6q9xegR+zFGkCgYEAtA2UG3/76nSCaO/wsn/hxlh39ytG5+k2MPcW -nzvanX8cxWZEUEIu/KR1uDvXx+S4mx6YXagCSTziG8kNovgDZt7hrdxVvHRt6ryv -Q3GgK7RlGpUXTdeDEac1jFlZbaVKrH/oitidtwuk34L67VwCjWf+9gXk8YUI/dKz -TCoT8qECgYEAyUbioIZuc6iWF2oIk3VuPdWHUvhuhzvYr+gb++P/xIXraEUMI81c -UFUDOw+jVVF6H0aioD1rRUczF9vJVE1pUZrXHbAViPECr6QgZTl1mluHtxnT8Asq -7sXS69HdlV+k+P+YZ51qRXRLKZsjwSJwn8fCRWS+7HPdQ3ogIWp1Q+A= ------END RSA PRIVATE KEY----- diff --git a/3rdparty/ixwebsocket/test/.certs/untrusted-client-crt.pem b/3rdparty/ixwebsocket/test/.certs/untrusted-client-crt.pem deleted file mode 100644 index 120073c..0000000 --- a/3rdparty/ixwebsocket/test/.certs/untrusted-client-crt.pem +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDOzCCAiOgAwIBAgIUXLY30LJGItNE9MlW/lkwsiz4ciEwDQYJKoZIhvcNAQEL -BQAwQzEUMBIGA1UECgwLbWFjaGluZXpvbmUxFDASBgNVBAoMC0lYV2ViU29ja2V0 -MRUwEwYDVQQDDAx1bnRydXN0ZWQtY2EwHhcNMjAwMzEyMjMwNDM3WhcNMjEwMzEy -MjMwNDM3WjBHMRQwEgYDVQQKDAttYWNoaW5lem9uZTEUMBIGA1UECgwLSVhXZWJT -b2NrZXQxGTAXBgNVBAMMEHVudHJ1c3RlZC1jbGllbnQwggEiMA0GCSqGSIb3DQEB -AQUAA4IBDwAwggEKAoIBAQC5SOVG06/37lekGxkBJUt7AN3Xw708jN8XI7DR1sq+ -NPeGN/wEfCUSIHJXQq1fqBJQkYKpyYa9EkvQs2RhrOXahul3ZdX1kP3zxQLvvbxU -EcB2gMS4B61EqnmBHRMsj+dI91++YSEFE1hkolD3+gQtm0+FVbPoXt5Y3rBAF/l0 -UMvrBsgraB12OHUlqqj8WkUIul37u8XcnsnPWKoigWb2k+/W47LCGsd+haRnulIK -ADQOsjNs7wy3IV9d8zCifEV0YUT5ZPBg2K2f1lpYfOSobK7JLqgV03HVrkROQfej -FTvMRtDAxlsa6bHLrGUeBhCNaO7SLj16oo5nMCq4DnTjAgMBAAGjIzAhMB8GA1Ud -EQQYMBaCCWxvY2FsaG9zdIIJMTI3LjAuMC4xMA0GCSqGSIb3DQEBCwUAA4IBAQDH -7XbX6dCzUCGj91835gvTPr5FgKrTqocVQ+EtCxJxRVvqB4zj7/80SHxByyWz9XJQ -IBZmDz298nVqfW6uegq3qU29sG9OAOOg6I0SpWOL9qq/ZKMoEqRv6fHnjHhRiOwT -isqdZISh1vhoIvcUpNsm1PwpaDxerjeE3oPyuNO0P0lKI5jykO3orDANGvyC8fzx -jxlDsSXCgmcaPh99752vBe8UlY1M8t4GxsJAV8DXxdDZCYIWMe+/C5aQ2xDvj3+l -vYht9+yc6ebl5uGOttgWSYPxdryCynDKsdBfXxet9Ix/qdsLF9hwU2JokVDh50J+ -er36eML3WvEO2HuBKTq8 ------END CERTIFICATE----- diff --git a/3rdparty/ixwebsocket/test/.certs/untrusted-client-key.pem b/3rdparty/ixwebsocket/test/.certs/untrusted-client-key.pem deleted file mode 100644 index d7040cd..0000000 --- a/3rdparty/ixwebsocket/test/.certs/untrusted-client-key.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAuUjlRtOv9+5XpBsZASVLewDd18O9PIzfFyOw0dbKvjT3hjf8 -BHwlEiByV0KtX6gSUJGCqcmGvRJL0LNkYazl2obpd2XV9ZD988UC7728VBHAdoDE -uAetRKp5gR0TLI/nSPdfvmEhBRNYZKJQ9/oELZtPhVWz6F7eWN6wQBf5dFDL6wbI -K2gddjh1Jaqo/FpFCLpd+7vF3J7Jz1iqIoFm9pPv1uOywhrHfoWkZ7pSCgA0DrIz -bO8MtyFfXfMwonxFdGFE+WTwYNitn9ZaWHzkqGyuyS6oFdNx1a5ETkH3oxU7zEbQ -wMZbGumxy6xlHgYQjWju0i49eqKOZzAquA504wIDAQABAoIBAHle6OG2dUShmkNj -hMOdXI5ciPV3wRRS6yhLNt6eJvzl0WbYcXu2nsn6+ytyAAPzItwoFUGHQ33C6Grz -uEPLcF3vliuiR7+ulMwEN+I3lZA0eLCntTUfwj6CtUkAdLjyIv1HHi6ljW23uGVj -dkqaOfZuEG81Lr5+toPci/PQQJYR4btVJJHCXJ6KVx6w8i++fwcRwby9riNhWAzk -8OhUiSTTsx9sioBk62QRB8Qs0LVR5tGbDSrpQW5Ns9KnH7sayInwEN94PTsPKcqY -i/oNNZG+qvSf8jG8QiIMdyGx/goVKuQVx5Gev8my5mnfuVM/oXB20T56z2iII64V -kNh/sNECgYEA3qjAPqTY0rnu2tmvQN1PwAfyENz3XmTVWpVtBvedPj3qiV3mXJGZ -qQoS0wb/2t/D05GhTxBJARk8foorNzGchMVtECMlGxDAs1vBw6dwSK5hJnw47PQQ -Q68Vz/zwvrzJgmeijPow87PdpomYECgerTa6BynH8W0ffuSNIJC8Ke8CgYEA1Qd2 -FpwFjUFqhYbcvR3VG8qAMIF8RKLzmQDDZh7liKMeHLypdXRz1ZEa6NFkvsg7qRZh -ahe/ULubnRhdOxs0JVyZPS0dU3ZmHT9bBcIuLzC//5e1ictXUZspFzIHE9T4suLC -Xnh2vqQzlEy3iZLx5B6FMzc3ws7LM7q7L2AfqE0CgYAMkvEQWJTaCaAAgeyQuC7J -xGkaJLBfh0g5LlkS3Kbnne2Bxmi874gC8MuxWSLXxG01pHK8mUnWIwu0ha79FfMl -2FRZZfKxfZe0SUk++FSx9g8MclVwpDPK7rdHoJwj2Vtz3tBiL7rV+GFbB0gsGWfq -Fj4ZK3XcH3J44wVJQoMtxwKBgQDM/ZkMuKY+/yvZwaS39vUTARHJm1BRW9y85pcg -tap6iTx4urL2a1Drue4DCzu+uj9uvjKPPLrEnUNpMADG166eJTTwQXFu1wf8LPMR -34FBt8+JzBrMtfcYeA5aW7Gjy9Rljv8qmRDq8mcP1aLnp5dMxHG4jvIBa6zt4kot -lHniIQKBgQDWuMWA2Q1kcKKy7OJszp60jO+ftq306QMoDsPNFLUUUtCxNSrpAeC2 -MVvI4kzIn+6hYsMdRsqDSadosuKE4ZzCPIfuyadiAKTAO5esBJs7KAQFMJXSnfY7 -+Zs1QUcdLZAWivO7j3ZASbR8L/1mawlBMgyIaT9YKp1+iW+uzaYgUQ== ------END RSA PRIVATE KEY----- diff --git a/3rdparty/ixwebsocket/test/.certs/wrong-name-server-crt.pem b/3rdparty/ixwebsocket/test/.certs/wrong-name-server-crt.pem deleted file mode 100644 index 24549fd..0000000 --- a/3rdparty/ixwebsocket/test/.certs/wrong-name-server-crt.pem +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDNDCCAhwCFCl+O/rR8flqYKKvD0iwkucFwMaLMA0GCSqGSIb3DQEBCwUAMEEx -FDASBgNVBAoMC21hY2hpbmV6b25lMRQwEgYDVQQKDAtJWFdlYlNvY2tldDETMBEG -A1UEAwwKdHJ1c3RlZC1jYTAgFw0yMjA4MjMyMDM2MjVaGA80MjgxMDYwMTIwMzYy -NVowajELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNBMREwDwYDVQQHDAhCZXJrZWxl -eTEbMBkGA1UECgwSRHVtbXkgT3JnYW5pemF0aW9uMR4wHAYDVQQDDBVub3QuYS52 -YWxpZC5ob3N0Lm5hbWUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC2 -9N806IjCvA82zfk9CPNwaEHOygNDJSXaZ38YDSI4C+Wf2imnMxrLQKaoccHUi+9L -4rQN/hSCg+uTULQUZ0iyssGDaIh4IcAeoEcNlXYHTrgP+aAaby3q5zeZ80K3+6e4 -rqcuBPV2lLszJu3XXwEKbDSxW3De0gc2N8m9DN8Lx7i70DRf0F4m6RIMFF/kHXwa -zZLeG7rZb4xL684lmmQsWtk5Z600CvrBtUE7fQ7bhy0QhSt66kdTSL8IKQrbWcGj -q0tggFlOqeyZSi73gqUiAIuGO8/tRgmp4HygNyC24jpOB5nObOPPJTUEf5Mk1Bum -kD5a+yL6YbVdhiaK17wbAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAKsLXGLfO1IZ -LbofGc7/TCQwRayR3RdG4864PBy97KfJWyizg7Wm4X4yPFRG+6q3X5NKW32Ew9lI -jXulXCTjWOiSxiG4Pk20uczkOhWVHFdnS9gZvykPC/ElxBKPalT6MMstZWxpElsk -rCDKXj4LkD0po8bZrjlgSZQQQk6XMRkoRai2GWLJqIjaNCSF8nqb1wM/1OE1tAwi -polO1eFMA24yypvlXcNrNXjqcQ7LaoQFQltmi/RV+uTk7EK2F2jgYVzJ/pe2ET0i -RIMbGZTlAiemDGL9SpMsxftG6fSmP6QqDqYExmmPlZMLprb2da/2kelWFA+VkvdG -zFrnIcyfMY4= ------END CERTIFICATE----- diff --git a/3rdparty/ixwebsocket/test/.certs/wrong-name-server-key.pem b/3rdparty/ixwebsocket/test/.certs/wrong-name-server-key.pem deleted file mode 100644 index b946f29..0000000 --- a/3rdparty/ixwebsocket/test/.certs/wrong-name-server-key.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAtvTfNOiIwrwPNs35PQjzcGhBzsoDQyUl2md/GA0iOAvln9op -pzMay0CmqHHB1IvvS+K0Df4UgoPrk1C0FGdIsrLBg2iIeCHAHqBHDZV2B064D/mg -Gm8t6uc3mfNCt/unuK6nLgT1dpS7Mybt118BCmw0sVtw3tIHNjfJvQzfC8e4u9A0 -X9BeJukSDBRf5B18Gs2S3hu62W+MS+vOJZpkLFrZOWetNAr6wbVBO30O24ctEIUr -eupHU0i/CCkK21nBo6tLYIBZTqnsmUou94KlIgCLhjvP7UYJqeB8oDcgtuI6TgeZ -zmzjzyU1BH+TJNQbppA+Wvsi+mG1XYYmite8GwIDAQABAoIBAGRzAXG9EglI01mV -sPfvyCi5NRhiFXRyGtxU4pTD8TuwXHxtfV0NU/KwJlBpVLBrvBCAAbeE/qHB6D9T -metx4ZorRs/tPrAmZ6LpANnWa50LfUdYGK0qyZ0lIYPm6YS2KJnfWm6LznEyq60j -/IW45YthaXTO7aOI0OjVrG+dd4CxU1g1NtCQ9bdDMDjfXFVnoOifXIl8W22eRMoZ -LzCz+0sI0R0LenXCPT566de21F0NDkIK7NaQ1l5BMX4PA+RsN3cZlzyruA1woPKI -aBR2LQGNrBfDVGMATtUm89RpWAftb8FmXqYUsM7zAzTO6dViitiB7OFlw7Ax15YH -MTj5zGECgYEA35ocEEMfyahBN70bjyiqOHlzKwFjDl9DsUf8xqHsNhYAL+GrOK9A -8lN5ByzcnbV3TJtU4WYbPgQJld8gXFx4h3eS+SkA/ASkAdtgHfdMImZ1v7k3TIPf -DXOCsHzELsQY6OgiI572Nwzx/Tl+0dFwaOfLjU9iEmmqL667j1Y4NiMCgYEA0Xch -9K/vwZ1I9gM3ySvG40R2TRriC9Bf8jwrEWeRsWNvBcqtMMrgwAMsMCKDugSZR7n6 -o3WZV6mpvYVLFx0b93v07i7EpFP27kMw3gLNBKX62snR9JbqwAMK7tktgLds5pKM -DvLHuAQ9XMMXMLX7WlSyhmtFeU7IDulTSHHqdakCgYEAywITCpy2xpKRK7bwx4gH -C6EQc/IdahYJ0nHmSL0IRY6x+sbrelp7H8ezcVVEs5bmylGYvc/DWgm2XjCnI9P8 -xhlFAhw9PZJFCT6QRISaxfy6WSgi0cBEieTeubd9MmxtpT/khuyy5AZHyj0iLAL4 -CPayMwjopIj0r7f3p8qC3HsCgYBmq2kmYVI4aZrIkv02CtIatYTy+DlSJxnQRvOp -PUWpWB6kDRrk7pxJIYT4NwKwG+7xvFQA6PR3hn7fmUUcGDWMEeMVGDFkho9ja+W4 -/FB3dc/Gi+PwakS4RwWF20e1brLfNXeXICMKrHFTVYC5bIm+VgOHZW8RLa9bt7wN -p2CPuQKBgQCjW+rCODmMzEues/I143mYMDdZ1IschtWGiXBNrpkHm/DcZSutbacm -5C7Kwv44pfA90NHDTjuaIgRgfeUTawkrl8uPXEuj80mW72agf5oS8lJzD+2jibCj -Q4K52G+0LaTxHLZxufil28Rgja01c0mTcuLbhKtCgHl5EHP19wOKEg== ------END RSA PRIVATE KEY----- diff --git a/3rdparty/ixwebsocket/test/.gitignore b/3rdparty/ixwebsocket/test/.gitignore deleted file mode 100644 index 910eaa6..0000000 --- a/3rdparty/ixwebsocket/test/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -CMakeCache.txt -package-lock.json -CMakeFiles -ixwebsocket_unittest -cmake_install.cmake -node_modules -ixwebsocket -Makefile -build -ixwebsocket_unittest.xml diff --git a/3rdparty/ixwebsocket/test/CMakeLists.txt b/3rdparty/ixwebsocket/test/CMakeLists.txt deleted file mode 100644 index bee57be..0000000 --- a/3rdparty/ixwebsocket/test/CMakeLists.txt +++ /dev/null @@ -1,99 +0,0 @@ -# -# Author: Benjamin Sergeant -# Copyright (c) 2018 Machine Zone, Inc. All rights reserved. -# -cmake_minimum_required (VERSION 3.14) -project (ixwebsocket_unittest) - -set (CMAKE_CXX_STANDARD 11) - -option(USE_TLS "Add TLS support" ON) - -# Shared sources -set (TEST_TARGET_NAMES - IXSocketTest - IXSocketConnectTest - IXWebSocketServerTest - IXWebSocketTestConnectionDisconnection - IXUrlParserTest - # IXHttpClientTest ## FIXME httpbin.org does not seem normal - IXUnityBuildsTest - IXHttpTest - IXDNSLookupTest - IXWebSocketSubProtocolTest - # IXWebSocketBroadcastTest ## FIXME was depending on cobra / take a broadcast server from ws - IXStrCaseCompareTest - IXExponentialBackoffTest - IXWebSocketCloseTest - IXWebSocketHostTest -) - -# Some unittest don't work on windows yet -# Windows without TLS does not have hmac yet -if (UNIX) - list(APPEND TEST_TARGET_NAMES - # Fail on Windows in CI probably because the pathing is wrong and - # some resource files cannot be found - IXHttpServerTest - IXWebSocketChatTest - ) -endif() - -if (USE_ZLIB) - list(APPEND TEST_TARGET_NAMES - IXWebSocketPerMessageDeflateCompressorTest - ) -endif() - -# Ping test fails intermittently, disabling them for now -# IXWebSocketPingTest.cpp -# IXWebSocketPingTimeoutTest.cpp - -# IXWebSocketLeakTest.cpp # commented until we have a fix for #224 / -# that was was fixed but now the test does not compile - -# Disable tests for now that are failing or not reliable - -add_library(ixwebsocket_test) -target_sources(ixwebsocket_test PRIVATE - ${JSONCPP_SOURCES} - test_runner.cpp - IXTest.cpp - ../third_party/msgpack11/msgpack11.cpp -) -target_compile_definitions(ixwebsocket_test PRIVATE ${TEST_PROGRAMS_DEFINITIONS}) -target_include_directories(ixwebsocket_test PRIVATE - ${PROJECT_SOURCE_DIR}/Catch2/single_include - ../third_party -) -target_link_libraries(ixwebsocket_test ixwebsocket) -target_link_libraries(ixwebsocket_test spdlog) - -foreach(TEST_TARGET_NAME ${TEST_TARGET_NAMES}) - add_executable(${TEST_TARGET_NAME} - ${TEST_TARGET_NAME}.cpp - ) - - target_include_directories(${TEST_TARGET_NAME} PRIVATE - ${PROJECT_SOURCE_DIR}/Catch2/single_include - ../third_party - ../third_party/msgpack11 - ) - - target_compile_definitions(${TEST_TARGET_NAME} PRIVATE SPDLOG_COMPILED_LIB=1) - - if (APPLE AND USE_TLS) - target_link_libraries(${TEST_TARGET_NAME} "-framework foundation" "-framework security") - endif() - - # library with the most dependencies come first - target_link_libraries(${TEST_TARGET_NAME} ixwebsocket_test) - target_link_libraries(${TEST_TARGET_NAME} ixwebsocket) - - target_link_libraries(${TEST_TARGET_NAME} spdlog) - - add_test(NAME ${TEST_TARGET_NAME} - COMMAND ${TEST_TARGET_NAME} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - -endforeach() diff --git a/3rdparty/ixwebsocket/test/Catch2/single_include/catch.hpp b/3rdparty/ixwebsocket/test/Catch2/single_include/catch.hpp deleted file mode 100644 index db1fed3..0000000 --- a/3rdparty/ixwebsocket/test/Catch2/single_include/catch.hpp +++ /dev/null @@ -1,17966 +0,0 @@ -/* - * Catch v2.13.8 - * Generated: 2022-01-03 21:20:09.589503 - * ---------------------------------------------------------- - * This file has been merged from multiple headers. Please don't edit it directly - * Copyright (c) 2022 Two Blue Cubes Ltd. All rights reserved. - * - * Distributed under the Boost Software License, Version 1.0. (See accompanying - * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - */ -#ifndef TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED -#define TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED -// start catch.hpp - - -#define CATCH_VERSION_MAJOR 2 -#define CATCH_VERSION_MINOR 13 -#define CATCH_VERSION_PATCH 8 - -#ifdef __clang__ -# pragma clang system_header -#elif defined __GNUC__ -# pragma GCC system_header -#endif - -// start catch_suppress_warnings.h - -#ifdef __clang__ -# ifdef __ICC // icpc defines the __clang__ macro -# pragma warning(push) -# pragma warning(disable: 161 1682) -# else // __ICC -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wpadded" -# pragma clang diagnostic ignored "-Wswitch-enum" -# pragma clang diagnostic ignored "-Wcovered-switch-default" -# endif -#elif defined __GNUC__ - // Because REQUIREs trigger GCC's -Wparentheses, and because still - // supported version of g++ have only buggy support for _Pragmas, - // Wparentheses have to be suppressed globally. -# pragma GCC diagnostic ignored "-Wparentheses" // See #674 for details - -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wunused-variable" -# pragma GCC diagnostic ignored "-Wpadded" -#endif -// end catch_suppress_warnings.h -#if defined(CATCH_CONFIG_MAIN) || defined(CATCH_CONFIG_RUNNER) -# define CATCH_IMPL -# define CATCH_CONFIG_ALL_PARTS -#endif - -// In the impl file, we want to have access to all parts of the headers -// Can also be used to sanely support PCHs -#if defined(CATCH_CONFIG_ALL_PARTS) -# define CATCH_CONFIG_EXTERNAL_INTERFACES -# if defined(CATCH_CONFIG_DISABLE_MATCHERS) -# undef CATCH_CONFIG_DISABLE_MATCHERS -# endif -# if !defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER) -# define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER -# endif -#endif - -#if !defined(CATCH_CONFIG_IMPL_ONLY) -// start catch_platform.h - -// See e.g.: -// https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h.auto.html -#ifdef __APPLE__ -# include -# if (defined(TARGET_OS_OSX) && TARGET_OS_OSX == 1) || \ - (defined(TARGET_OS_MAC) && TARGET_OS_MAC == 1) -# define CATCH_PLATFORM_MAC -# elif (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE == 1) -# define CATCH_PLATFORM_IPHONE -# endif - -#elif defined(linux) || defined(__linux) || defined(__linux__) -# define CATCH_PLATFORM_LINUX - -#elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) || defined(__MINGW32__) -# define CATCH_PLATFORM_WINDOWS -#endif - -// end catch_platform.h - -#ifdef CATCH_IMPL -# ifndef CLARA_CONFIG_MAIN -# define CLARA_CONFIG_MAIN_NOT_DEFINED -# define CLARA_CONFIG_MAIN -# endif -#endif - -// start catch_user_interfaces.h - -namespace Catch { - unsigned int rngSeed(); -} - -// end catch_user_interfaces.h -// start catch_tag_alias_autoregistrar.h - -// start catch_common.h - -// start catch_compiler_capabilities.h - -// Detect a number of compiler features - by compiler -// The following features are defined: -// -// CATCH_CONFIG_COUNTER : is the __COUNTER__ macro supported? -// CATCH_CONFIG_WINDOWS_SEH : is Windows SEH supported? -// CATCH_CONFIG_POSIX_SIGNALS : are POSIX signals supported? -// CATCH_CONFIG_DISABLE_EXCEPTIONS : Are exceptions enabled? -// **************** -// Note to maintainers: if new toggles are added please document them -// in configuration.md, too -// **************** - -// In general each macro has a _NO_ form -// (e.g. CATCH_CONFIG_NO_POSIX_SIGNALS) which disables the feature. -// Many features, at point of detection, define an _INTERNAL_ macro, so they -// can be combined, en-mass, with the _NO_ forms later. - -#ifdef __cplusplus - -# if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L) -# define CATCH_CPP14_OR_GREATER -# endif - -# if (__cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) -# define CATCH_CPP17_OR_GREATER -# endif - -#endif - -// Only GCC compiler should be used in this block, so other compilers trying to -// mask themselves as GCC should be ignored. -#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__CUDACC__) && !defined(__LCC__) -# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic push" ) -# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic pop" ) - -# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) - -#endif - -#if defined(__clang__) - -# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic push" ) -# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic pop" ) - -// As of this writing, IBM XL's implementation of __builtin_constant_p has a bug -// which results in calls to destructors being emitted for each temporary, -// without a matching initialization. In practice, this can result in something -// like `std::string::~string` being called on an uninitialized value. -// -// For example, this code will likely segfault under IBM XL: -// ``` -// REQUIRE(std::string("12") + "34" == "1234") -// ``` -// -// Therefore, `CATCH_INTERNAL_IGNORE_BUT_WARN` is not implemented. -# if !defined(__ibmxl__) && !defined(__CUDACC__) -# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg, hicpp-vararg) */ -# endif - -# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ - _Pragma( "clang diagnostic ignored \"-Wexit-time-destructors\"" ) \ - _Pragma( "clang diagnostic ignored \"-Wglobal-constructors\"") - -# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \ - _Pragma( "clang diagnostic ignored \"-Wparentheses\"" ) - -# define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \ - _Pragma( "clang diagnostic ignored \"-Wunused-variable\"" ) - -# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \ - _Pragma( "clang diagnostic ignored \"-Wgnu-zero-variadic-macro-arguments\"" ) - -# define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \ - _Pragma( "clang diagnostic ignored \"-Wunused-template\"" ) - -#endif // __clang__ - -//////////////////////////////////////////////////////////////////////////////// -// Assume that non-Windows platforms support posix signals by default -#if !defined(CATCH_PLATFORM_WINDOWS) - #define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS -#endif - -//////////////////////////////////////////////////////////////////////////////// -// We know some environments not to support full POSIX signals -#if defined(__CYGWIN__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || defined(__DJGPP__) - #define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS -#endif - -#ifdef __OS400__ -# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS -# define CATCH_CONFIG_COLOUR_NONE -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Android somehow still does not support std::to_string -#if defined(__ANDROID__) -# define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING -# define CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Not all Windows environments support SEH properly -#if defined(__MINGW32__) -# define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH -#endif - -//////////////////////////////////////////////////////////////////////////////// -// PS4 -#if defined(__ORBIS__) -# define CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Cygwin -#ifdef __CYGWIN__ - -// Required for some versions of Cygwin to declare gettimeofday -// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin -# define _BSD_SOURCE -// some versions of cygwin (most) do not support std::to_string. Use the libstd check. -// https://gcc.gnu.org/onlinedocs/gcc-4.8.2/libstdc++/api/a01053_source.html line 2812-2813 -# if !((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \ - && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF)) - -# define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING - -# endif -#endif // __CYGWIN__ - -//////////////////////////////////////////////////////////////////////////////// -// Visual C++ -#if defined(_MSC_VER) - -// Universal Windows platform does not support SEH -// Or console colours (or console at all...) -# if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) -# define CATCH_CONFIG_COLOUR_NONE -# else -# define CATCH_INTERNAL_CONFIG_WINDOWS_SEH -# endif - -# if !defined(__clang__) // Handle Clang masquerading for msvc - -// MSVC traditional preprocessor needs some workaround for __VA_ARGS__ -// _MSVC_TRADITIONAL == 0 means new conformant preprocessor -// _MSVC_TRADITIONAL == 1 means old traditional non-conformant preprocessor -# if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL) -# define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR -# endif // MSVC_TRADITIONAL - -// Only do this if we're not using clang on Windows, which uses `diagnostic push` & `diagnostic pop` -# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION __pragma( warning(push) ) -# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION __pragma( warning(pop) ) -# endif // __clang__ - -#endif // _MSC_VER - -#if defined(_REENTRANT) || defined(_MSC_VER) -// Enable async processing, as -pthread is specified or no additional linking is required -# define CATCH_INTERNAL_CONFIG_USE_ASYNC -#endif // _MSC_VER - -//////////////////////////////////////////////////////////////////////////////// -// Check if we are compiled with -fno-exceptions or equivalent -#if defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND) -# define CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED -#endif - -//////////////////////////////////////////////////////////////////////////////// -// DJGPP -#ifdef __DJGPP__ -# define CATCH_INTERNAL_CONFIG_NO_WCHAR -#endif // __DJGPP__ - -//////////////////////////////////////////////////////////////////////////////// -// Embarcadero C++Build -#if defined(__BORLANDC__) - #define CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN -#endif - -//////////////////////////////////////////////////////////////////////////////// - -// Use of __COUNTER__ is suppressed during code analysis in -// CLion/AppCode 2017.2.x and former, because __COUNTER__ is not properly -// handled by it. -// Otherwise all supported compilers support COUNTER macro, -// but user still might want to turn it off -#if ( !defined(__JETBRAINS_IDE__) || __JETBRAINS_IDE__ >= 20170300L ) - #define CATCH_INTERNAL_CONFIG_COUNTER -#endif - -//////////////////////////////////////////////////////////////////////////////// - -// RTX is a special version of Windows that is real time. -// This means that it is detected as Windows, but does not provide -// the same set of capabilities as real Windows does. -#if defined(UNDER_RTSS) || defined(RTX64_BUILD) - #define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH - #define CATCH_INTERNAL_CONFIG_NO_ASYNC - #define CATCH_CONFIG_COLOUR_NONE -#endif - -#if !defined(_GLIBCXX_USE_C99_MATH_TR1) -#define CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER -#endif - -// Various stdlib support checks that require __has_include -#if defined(__has_include) - // Check if string_view is available and usable - #if __has_include() && defined(CATCH_CPP17_OR_GREATER) - # define CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW - #endif - - // Check if optional is available and usable - # if __has_include() && defined(CATCH_CPP17_OR_GREATER) - # define CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL - # endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) - - // Check if byte is available and usable - # if __has_include() && defined(CATCH_CPP17_OR_GREATER) - # include - # if defined(__cpp_lib_byte) && (__cpp_lib_byte > 0) - # define CATCH_INTERNAL_CONFIG_CPP17_BYTE - # endif - # endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) - - // Check if variant is available and usable - # if __has_include() && defined(CATCH_CPP17_OR_GREATER) - # if defined(__clang__) && (__clang_major__ < 8) - // work around clang bug with libstdc++ https://bugs.llvm.org/show_bug.cgi?id=31852 - // fix should be in clang 8, workaround in libstdc++ 8.2 - # include - # if defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9) - # define CATCH_CONFIG_NO_CPP17_VARIANT - # else - # define CATCH_INTERNAL_CONFIG_CPP17_VARIANT - # endif // defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9) - # else - # define CATCH_INTERNAL_CONFIG_CPP17_VARIANT - # endif // defined(__clang__) && (__clang_major__ < 8) - # endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) -#endif // defined(__has_include) - -#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER) -# define CATCH_CONFIG_COUNTER -#endif -#if defined(CATCH_INTERNAL_CONFIG_WINDOWS_SEH) && !defined(CATCH_CONFIG_NO_WINDOWS_SEH) && !defined(CATCH_CONFIG_WINDOWS_SEH) && !defined(CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH) -# define CATCH_CONFIG_WINDOWS_SEH -#endif -// This is set by default, because we assume that unix compilers are posix-signal-compatible by default. -#if defined(CATCH_INTERNAL_CONFIG_POSIX_SIGNALS) && !defined(CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_POSIX_SIGNALS) -# define CATCH_CONFIG_POSIX_SIGNALS -#endif -// This is set by default, because we assume that compilers with no wchar_t support are just rare exceptions. -#if !defined(CATCH_INTERNAL_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_WCHAR) -# define CATCH_CONFIG_WCHAR -#endif - -#if !defined(CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_CPP11_TO_STRING) -# define CATCH_CONFIG_CPP11_TO_STRING -#endif - -#if defined(CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_NO_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_CPP17_OPTIONAL) -# define CATCH_CONFIG_CPP17_OPTIONAL -#endif - -#if defined(CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_NO_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_CPP17_STRING_VIEW) -# define CATCH_CONFIG_CPP17_STRING_VIEW -#endif - -#if defined(CATCH_INTERNAL_CONFIG_CPP17_VARIANT) && !defined(CATCH_CONFIG_NO_CPP17_VARIANT) && !defined(CATCH_CONFIG_CPP17_VARIANT) -# define CATCH_CONFIG_CPP17_VARIANT -#endif - -#if defined(CATCH_INTERNAL_CONFIG_CPP17_BYTE) && !defined(CATCH_CONFIG_NO_CPP17_BYTE) && !defined(CATCH_CONFIG_CPP17_BYTE) -# define CATCH_CONFIG_CPP17_BYTE -#endif - -#if defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT) -# define CATCH_INTERNAL_CONFIG_NEW_CAPTURE -#endif - -#if defined(CATCH_INTERNAL_CONFIG_NEW_CAPTURE) && !defined(CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NEW_CAPTURE) -# define CATCH_CONFIG_NEW_CAPTURE -#endif - -#if !defined(CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED) && !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) -# define CATCH_CONFIG_DISABLE_EXCEPTIONS -#endif - -#if defined(CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_NO_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_POLYFILL_ISNAN) -# define CATCH_CONFIG_POLYFILL_ISNAN -#endif - -#if defined(CATCH_INTERNAL_CONFIG_USE_ASYNC) && !defined(CATCH_INTERNAL_CONFIG_NO_ASYNC) && !defined(CATCH_CONFIG_NO_USE_ASYNC) && !defined(CATCH_CONFIG_USE_ASYNC) -# define CATCH_CONFIG_USE_ASYNC -#endif - -#if defined(CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE) && !defined(CATCH_CONFIG_NO_ANDROID_LOGWRITE) && !defined(CATCH_CONFIG_ANDROID_LOGWRITE) -# define CATCH_CONFIG_ANDROID_LOGWRITE -#endif - -#if defined(CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_NO_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_GLOBAL_NEXTAFTER) -# define CATCH_CONFIG_GLOBAL_NEXTAFTER -#endif - -// Even if we do not think the compiler has that warning, we still have -// to provide a macro that can be used by the code. -#if !defined(CATCH_INTERNAL_START_WARNINGS_SUPPRESSION) -# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION -#endif -#if !defined(CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION) -# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION -#endif -#if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS -#endif -#if !defined(CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS -#endif -#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS -#endif -#if !defined(CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS -#endif - -// The goal of this macro is to avoid evaluation of the arguments, but -// still have the compiler warn on problems inside... -#if !defined(CATCH_INTERNAL_IGNORE_BUT_WARN) -# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) -#endif - -#if defined(__APPLE__) && defined(__apple_build_version__) && (__clang_major__ < 10) -# undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS -#elif defined(__clang__) && (__clang_major__ < 5) -# undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS -#endif - -#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS -#endif - -#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) -#define CATCH_TRY if ((true)) -#define CATCH_CATCH_ALL if ((false)) -#define CATCH_CATCH_ANON(type) if ((false)) -#else -#define CATCH_TRY try -#define CATCH_CATCH_ALL catch (...) -#define CATCH_CATCH_ANON(type) catch (type) -#endif - -#if defined(CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_NO_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) -#define CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR -#endif - -// end catch_compiler_capabilities.h -#define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line -#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) -#ifdef CATCH_CONFIG_COUNTER -# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ ) -#else -# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ ) -#endif - -#include -#include -#include - -// We need a dummy global operator<< so we can bring it into Catch namespace later -struct Catch_global_namespace_dummy {}; -std::ostream& operator<<(std::ostream&, Catch_global_namespace_dummy); - -namespace Catch { - - struct CaseSensitive { enum Choice { - Yes, - No - }; }; - - class NonCopyable { - NonCopyable( NonCopyable const& ) = delete; - NonCopyable( NonCopyable && ) = delete; - NonCopyable& operator = ( NonCopyable const& ) = delete; - NonCopyable& operator = ( NonCopyable && ) = delete; - - protected: - NonCopyable(); - virtual ~NonCopyable(); - }; - - struct SourceLineInfo { - - SourceLineInfo() = delete; - SourceLineInfo( char const* _file, std::size_t _line ) noexcept - : file( _file ), - line( _line ) - {} - - SourceLineInfo( SourceLineInfo const& other ) = default; - SourceLineInfo& operator = ( SourceLineInfo const& ) = default; - SourceLineInfo( SourceLineInfo&& ) noexcept = default; - SourceLineInfo& operator = ( SourceLineInfo&& ) noexcept = default; - - bool empty() const noexcept { return file[0] == '\0'; } - bool operator == ( SourceLineInfo const& other ) const noexcept; - bool operator < ( SourceLineInfo const& other ) const noexcept; - - char const* file; - std::size_t line; - }; - - std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ); - - // Bring in operator<< from global namespace into Catch namespace - // This is necessary because the overload of operator<< above makes - // lookup stop at namespace Catch - using ::operator<<; - - // Use this in variadic streaming macros to allow - // >> +StreamEndStop - // as well as - // >> stuff +StreamEndStop - struct StreamEndStop { - std::string operator+() const; - }; - template - T const& operator + ( T const& value, StreamEndStop ) { - return value; - } -} - -#define CATCH_INTERNAL_LINEINFO \ - ::Catch::SourceLineInfo( __FILE__, static_cast( __LINE__ ) ) - -// end catch_common.h -namespace Catch { - - struct RegistrarForTagAliases { - RegistrarForTagAliases( char const* alias, char const* tag, SourceLineInfo const& lineInfo ); - }; - -} // end namespace Catch - -#define CATCH_REGISTER_TAG_ALIAS( alias, spec ) \ - CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ - CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ - namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } \ - CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION - -// end catch_tag_alias_autoregistrar.h -// start catch_test_registry.h - -// start catch_interfaces_testcase.h - -#include - -namespace Catch { - - class TestSpec; - - struct ITestInvoker { - virtual void invoke () const = 0; - virtual ~ITestInvoker(); - }; - - class TestCase; - struct IConfig; - - struct ITestCaseRegistry { - virtual ~ITestCaseRegistry(); - virtual std::vector const& getAllTests() const = 0; - virtual std::vector const& getAllTestsSorted( IConfig const& config ) const = 0; - }; - - bool isThrowSafe( TestCase const& testCase, IConfig const& config ); - bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ); - std::vector filterTests( std::vector const& testCases, TestSpec const& testSpec, IConfig const& config ); - std::vector const& getAllTestCasesSorted( IConfig const& config ); - -} - -// end catch_interfaces_testcase.h -// start catch_stringref.h - -#include -#include -#include -#include - -namespace Catch { - - /// A non-owning string class (similar to the forthcoming std::string_view) - /// Note that, because a StringRef may be a substring of another string, - /// it may not be null terminated. - class StringRef { - public: - using size_type = std::size_t; - using const_iterator = const char*; - - private: - static constexpr char const* const s_empty = ""; - - char const* m_start = s_empty; - size_type m_size = 0; - - public: // construction - constexpr StringRef() noexcept = default; - - StringRef( char const* rawChars ) noexcept; - - constexpr StringRef( char const* rawChars, size_type size ) noexcept - : m_start( rawChars ), - m_size( size ) - {} - - StringRef( std::string const& stdString ) noexcept - : m_start( stdString.c_str() ), - m_size( stdString.size() ) - {} - - explicit operator std::string() const { - return std::string(m_start, m_size); - } - - public: // operators - auto operator == ( StringRef const& other ) const noexcept -> bool; - auto operator != (StringRef const& other) const noexcept -> bool { - return !(*this == other); - } - - auto operator[] ( size_type index ) const noexcept -> char { - assert(index < m_size); - return m_start[index]; - } - - public: // named queries - constexpr auto empty() const noexcept -> bool { - return m_size == 0; - } - constexpr auto size() const noexcept -> size_type { - return m_size; - } - - // Returns the current start pointer. If the StringRef is not - // null-terminated, throws std::domain_exception - auto c_str() const -> char const*; - - public: // substrings and searches - // Returns a substring of [start, start + length). - // If start + length > size(), then the substring is [start, size()). - // If start > size(), then the substring is empty. - auto substr( size_type start, size_type length ) const noexcept -> StringRef; - - // Returns the current start pointer. May not be null-terminated. - auto data() const noexcept -> char const*; - - constexpr auto isNullTerminated() const noexcept -> bool { - return m_start[m_size] == '\0'; - } - - public: // iterators - constexpr const_iterator begin() const { return m_start; } - constexpr const_iterator end() const { return m_start + m_size; } - }; - - auto operator += ( std::string& lhs, StringRef const& sr ) -> std::string&; - auto operator << ( std::ostream& os, StringRef const& sr ) -> std::ostream&; - - constexpr auto operator "" _sr( char const* rawChars, std::size_t size ) noexcept -> StringRef { - return StringRef( rawChars, size ); - } -} // namespace Catch - -constexpr auto operator "" _catch_sr( char const* rawChars, std::size_t size ) noexcept -> Catch::StringRef { - return Catch::StringRef( rawChars, size ); -} - -// end catch_stringref.h -// start catch_preprocessor.hpp - - -#define CATCH_RECURSION_LEVEL0(...) __VA_ARGS__ -#define CATCH_RECURSION_LEVEL1(...) CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(__VA_ARGS__))) -#define CATCH_RECURSION_LEVEL2(...) CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(__VA_ARGS__))) -#define CATCH_RECURSION_LEVEL3(...) CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(__VA_ARGS__))) -#define CATCH_RECURSION_LEVEL4(...) CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(__VA_ARGS__))) -#define CATCH_RECURSION_LEVEL5(...) CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(__VA_ARGS__))) - -#ifdef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR -#define INTERNAL_CATCH_EXPAND_VARGS(...) __VA_ARGS__ -// MSVC needs more evaluations -#define CATCH_RECURSION_LEVEL6(...) CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(__VA_ARGS__))) -#define CATCH_RECURSE(...) CATCH_RECURSION_LEVEL6(CATCH_RECURSION_LEVEL6(__VA_ARGS__)) -#else -#define CATCH_RECURSE(...) CATCH_RECURSION_LEVEL5(__VA_ARGS__) -#endif - -#define CATCH_REC_END(...) -#define CATCH_REC_OUT - -#define CATCH_EMPTY() -#define CATCH_DEFER(id) id CATCH_EMPTY() - -#define CATCH_REC_GET_END2() 0, CATCH_REC_END -#define CATCH_REC_GET_END1(...) CATCH_REC_GET_END2 -#define CATCH_REC_GET_END(...) CATCH_REC_GET_END1 -#define CATCH_REC_NEXT0(test, next, ...) next CATCH_REC_OUT -#define CATCH_REC_NEXT1(test, next) CATCH_DEFER ( CATCH_REC_NEXT0 ) ( test, next, 0) -#define CATCH_REC_NEXT(test, next) CATCH_REC_NEXT1(CATCH_REC_GET_END test, next) - -#define CATCH_REC_LIST0(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ ) -#define CATCH_REC_LIST1(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0) ) ( f, peek, __VA_ARGS__ ) -#define CATCH_REC_LIST2(f, x, peek, ...) f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ ) - -#define CATCH_REC_LIST0_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ ) -#define CATCH_REC_LIST1_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0_UD) ) ( f, userdata, peek, __VA_ARGS__ ) -#define CATCH_REC_LIST2_UD(f, userdata, x, peek, ...) f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ ) - -// Applies the function macro `f` to each of the remaining parameters, inserts commas between the results, -// and passes userdata as the first parameter to each invocation, -// e.g. CATCH_REC_LIST_UD(f, x, a, b, c) evaluates to f(x, a), f(x, b), f(x, c) -#define CATCH_REC_LIST_UD(f, userdata, ...) CATCH_RECURSE(CATCH_REC_LIST2_UD(f, userdata, __VA_ARGS__, ()()(), ()()(), ()()(), 0)) - -#define CATCH_REC_LIST(f, ...) CATCH_RECURSE(CATCH_REC_LIST2(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0)) - -#define INTERNAL_CATCH_EXPAND1(param) INTERNAL_CATCH_EXPAND2(param) -#define INTERNAL_CATCH_EXPAND2(...) INTERNAL_CATCH_NO## __VA_ARGS__ -#define INTERNAL_CATCH_DEF(...) INTERNAL_CATCH_DEF __VA_ARGS__ -#define INTERNAL_CATCH_NOINTERNAL_CATCH_DEF -#define INTERNAL_CATCH_STRINGIZE(...) INTERNAL_CATCH_STRINGIZE2(__VA_ARGS__) -#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR -#define INTERNAL_CATCH_STRINGIZE2(...) #__VA_ARGS__ -#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) -#else -// MSVC is adding extra space and needs another indirection to expand INTERNAL_CATCH_NOINTERNAL_CATCH_DEF -#define INTERNAL_CATCH_STRINGIZE2(...) INTERNAL_CATCH_STRINGIZE3(__VA_ARGS__) -#define INTERNAL_CATCH_STRINGIZE3(...) #__VA_ARGS__ -#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) (INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) + 1) -#endif - -#define INTERNAL_CATCH_MAKE_NAMESPACE2(...) ns_##__VA_ARGS__ -#define INTERNAL_CATCH_MAKE_NAMESPACE(name) INTERNAL_CATCH_MAKE_NAMESPACE2(name) - -#define INTERNAL_CATCH_REMOVE_PARENS(...) INTERNAL_CATCH_EXPAND1(INTERNAL_CATCH_DEF __VA_ARGS__) - -#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR -#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) decltype(get_wrapper()) -#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__)) -#else -#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) INTERNAL_CATCH_EXPAND_VARGS(decltype(get_wrapper())) -#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__))) -#endif - -#define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(...)\ - CATCH_REC_LIST(INTERNAL_CATCH_MAKE_TYPE_LIST,__VA_ARGS__) - -#define INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_0) INTERNAL_CATCH_REMOVE_PARENS(_0) -#define INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_0, _1) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_1) -#define INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_0, _1, _2) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_1, _2) -#define INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_0, _1, _2, _3) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_1, _2, _3) -#define INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_0, _1, _2, _3, _4) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_1, _2, _3, _4) -#define INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_0, _1, _2, _3, _4, _5) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_1, _2, _3, _4, _5) -#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _3, _4, _5, _6) -#define INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_0, _1, _2, _3, _4, _5, _6, _7) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_1, _2, _3, _4, _5, _6, _7) -#define INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_1, _2, _3, _4, _5, _6, _7, _8) -#define INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9) -#define INTERNAL_CATCH_REMOVE_PARENS_11_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10) - -#define INTERNAL_CATCH_VA_NARGS_IMPL(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N - -#define INTERNAL_CATCH_TYPE_GEN\ - template struct TypeList {};\ - template\ - constexpr auto get_wrapper() noexcept -> TypeList { return {}; }\ - template class...> struct TemplateTypeList{};\ - template class...Cs>\ - constexpr auto get_wrapper() noexcept -> TemplateTypeList { return {}; }\ - template\ - struct append;\ - template\ - struct rewrap;\ - template class, typename...>\ - struct create;\ - template class, typename>\ - struct convert;\ - \ - template \ - struct append { using type = T; };\ - template< template class L1, typename...E1, template class L2, typename...E2, typename...Rest>\ - struct append, L2, Rest...> { using type = typename append, Rest...>::type; };\ - template< template class L1, typename...E1, typename...Rest>\ - struct append, TypeList, Rest...> { using type = L1; };\ - \ - template< template class Container, template class List, typename...elems>\ - struct rewrap, List> { using type = TypeList>; };\ - template< template class Container, template class List, class...Elems, typename...Elements>\ - struct rewrap, List, Elements...> { using type = typename append>, typename rewrap, Elements...>::type>::type; };\ - \ - template