diff --git a/.gitmodules b/.gitmodules
index 8b63492da1..47fb3b2164 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,9 @@
[submodule "Themes/Simply-Love"]
path = Themes/Simply Love
url = https://github.com/Simply-Love/Simply-Love-SM5.git
+[submodule "extern/ixwebsocket"]
+ path = extern/IXWebSocket
+ url = https://github.com/machinezone/IXWebSocket.git
+[submodule "extern/mbedtls"]
+ path = extern/mbedtls
+ url = https://github.com/Mbed-TLS/mbedtls.git
diff --git a/extern/CMakeProject-ixwebsocket.cmake b/extern/CMakeProject-ixwebsocket.cmake
index e4f95fa57c..7b73d62390 100644
--- a/extern/CMakeProject-ixwebsocket.cmake
+++ b/extern/CMakeProject-ixwebsocket.cmake
@@ -1,8 +1,6 @@
-set(IXW_DIR "${SM_EXTERN_DIR}/IXWebSocket-11.3.2/ixwebsocket")
-set(MBEDTLS_DIR "${SM_EXTERN_DIR}/mbedtls-3.1.0")
+set(IXW_DIR "IXWebSocket/ixwebsocket")
-list(APPEND IXW_SRC
- "${IXW_DIR}/IXBench.cpp"
+set(IXW_SRC "${IXW_DIR}/IXBench.cpp"
"${IXW_DIR}/IXCancellationRequest.cpp"
"${IXW_DIR}/IXConnectionState.cpp"
"${IXW_DIR}/IXDNSLookup.cpp"
@@ -14,6 +12,7 @@ list(APPEND IXW_SRC
"${IXW_DIR}/IXHttpServer.cpp"
"${IXW_DIR}/IXNetSystem.cpp"
"${IXW_DIR}/IXSelectInterrupt.cpp"
+ "${IXW_DIR}/IXSelectInterruptEvent.cpp"
"${IXW_DIR}/IXSelectInterruptFactory.cpp"
"${IXW_DIR}/IXSelectInterruptPipe.cpp"
"${IXW_DIR}/IXSetThreadName.cpp"
@@ -38,8 +37,7 @@ list(APPEND IXW_SRC
"${IXW_DIR}/IXWebSocketServer.cpp"
"${IXW_DIR}/IXWebSocketTransport.cpp")
-list(APPEND IXW_HPP
- "${IXW_DIR}/IXBench.h"
+set(IXW_HPP "${IXW_DIR}/IXBench.h"
"${IXW_DIR}/IXCancellationRequest.h"
"${IXW_DIR}/IXConnectionState.h"
"${IXW_DIR}/IXDNSLookup.h"
@@ -52,6 +50,7 @@ list(APPEND IXW_HPP
"${IXW_DIR}/IXNetSystem.h"
"${IXW_DIR}/IXProgressCallback.h"
"${IXW_DIR}/IXSelectInterrupt.h"
+ "${IXW_DIR}/IXSelectInterruptEvent.h"
"${IXW_DIR}/IXSelectInterruptFactory.h"
"${IXW_DIR}/IXSelectInterruptPipe.h"
"${IXW_DIR}/IXSetThreadName.h"
@@ -117,7 +116,7 @@ if(APPLE)
elseif(WIN32)
target_compile_definitions("ixwebsocket" PRIVATE IXWEBSOCKET_USE_MBED_TLS)
target_compile_definitions("ixwebsocket" PRIVATE IXWEBSOCKET_USE_MBED_TLS_MIN_VERSION_3)
- add_subdirectory("${MBEDTLS_DIR}" EXCLUDE_FROM_ALL)
+ add_subdirectory("mbedtls" EXCLUDE_FROM_ALL)
set_property(TARGET "mbedtls" PROPERTY FOLDER "External Libraries")
set_property(TARGET "mbedcrypto" PROPERTY FOLDER "External Libraries")
set_property(TARGET "mbedx509" PROPERTY FOLDER "External Libraries")
@@ -142,11 +141,7 @@ if(UNIX)
target_link_libraries(ixwebsocket ${CMAKE_THREAD_LIBS_INIT})
endif()
-target_include_directories("ixwebsocket" PUBLIC "${IXW_DIR}")
-
-set(IXWEBSOCKET_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/IXWebSocket-11.3.2")
-
target_include_directories(ixwebsocket PUBLIC
"zlib"
- $
+ "IXWebSocket"
)
diff --git a/extern/IXWebSocket b/extern/IXWebSocket
new file mode 160000
index 0000000000..e417e63605
--- /dev/null
+++ b/extern/IXWebSocket
@@ -0,0 +1 @@
+Subproject commit e417e636053552c31bf1a435e383034dab665924
diff --git a/extern/IXWebSocket-11.3.2/.clang-format b/extern/IXWebSocket-11.3.2/.clang-format
deleted file mode 100644
index 02e5226f45..0000000000
--- a/extern/IXWebSocket-11.3.2/.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/extern/IXWebSocket-11.3.2/.dockerignore b/extern/IXWebSocket-11.3.2/.dockerignore
deleted file mode 100644
index 538648ad27..0000000000
--- a/extern/IXWebSocket-11.3.2/.dockerignore
+++ /dev/null
@@ -1,5 +0,0 @@
-build
-CMakeCache.txt
-ws/CMakeCache.txt
-test/build
-makefile
diff --git a/extern/IXWebSocket-11.3.2/.github/workflows/docker.yml b/extern/IXWebSocket-11.3.2/.github/workflows/docker.yml
deleted file mode 100644
index bedb92b8b0..0000000000
--- a/extern/IXWebSocket-11.3.2/.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/extern/IXWebSocket-11.3.2/.github/workflows/mkdocs.yml b/extern/IXWebSocket-11.3.2/.github/workflows/mkdocs.yml
deleted file mode 100644
index 7000643cab..0000000000
--- a/extern/IXWebSocket-11.3.2/.github/workflows/mkdocs.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-name: mkdocs
-on:
- push:
- paths:
- - 'docs/**'
-
-jobs:
- linux:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python 3.8
- uses: actions/setup-python@v1
- with:
- python-version: 3.8
- - 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 clean -dfx .
- git fetch
- git pull
- mkdocs gh-deploy
diff --git a/extern/IXWebSocket-11.3.2/.github/workflows/stale.yml b/extern/IXWebSocket-11.3.2/.github/workflows/stale.yml
deleted file mode 100644
index 7bbc0505bf..0000000000
--- a/extern/IXWebSocket-11.3.2/.github/workflows/stale.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-name: Mark stale issues and pull requests
-
-on:
- schedule:
- - cron: "0 0 * * *"
-
-jobs:
- stale:
-
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/stale@v1
- with:
- repo-token: ${{ secrets.GITHUB_TOKEN }}
- stale-issue-message: 'Stale issue message'
- stale-pr-message: 'Stale pull request message'
- stale-issue-label: 'no-issue-activity'
- stale-pr-label: 'no-pr-activity'
diff --git a/extern/IXWebSocket-11.3.2/.github/workflows/unittest_linux.yml b/extern/IXWebSocket-11.3.2/.github/workflows/unittest_linux.yml
deleted file mode 100644
index 9c6272a5db..0000000000
--- a/extern/IXWebSocket-11.3.2/.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/extern/IXWebSocket-11.3.2/.github/workflows/unittest_linux_asan.yml b/extern/IXWebSocket-11.3.2/.github/workflows/unittest_linux_asan.yml
deleted file mode 100644
index 613c618ebb..0000000000
--- a/extern/IXWebSocket-11.3.2/.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/extern/IXWebSocket-11.3.2/.github/workflows/unittest_mac_tsan_mbedtls.yml b/extern/IXWebSocket-11.3.2/.github/workflows/unittest_mac_tsan_mbedtls.yml
deleted file mode 100644
index ab4d226b64..0000000000
--- a/extern/IXWebSocket-11.3.2/.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/extern/IXWebSocket-11.3.2/.github/workflows/unittest_mac_tsan_openssl.yml b/extern/IXWebSocket-11.3.2/.github/workflows/unittest_mac_tsan_openssl.yml
deleted file mode 100644
index ddc9c7dfc7..0000000000
--- a/extern/IXWebSocket-11.3.2/.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/extern/IXWebSocket-11.3.2/.github/workflows/unittest_mac_tsan_sectransport.yml b/extern/IXWebSocket-11.3.2/.github/workflows/unittest_mac_tsan_sectransport.yml
deleted file mode 100644
index 739c0c423e..0000000000
--- a/extern/IXWebSocket-11.3.2/.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/extern/IXWebSocket-11.3.2/.github/workflows/unittest_uwp.yml b/extern/IXWebSocket-11.3.2/.github/workflows/unittest_uwp.yml
deleted file mode 100644
index a721e30add..0000000000
--- a/extern/IXWebSocket-11.3.2/.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/extern/IXWebSocket-11.3.2/.github/workflows/unittest_windows.yml b/extern/IXWebSocket-11.3.2/.github/workflows/unittest_windows.yml
deleted file mode 100644
index cca5cc2a19..0000000000
--- a/extern/IXWebSocket-11.3.2/.github/workflows/unittest_windows.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-name: windows
-on:
- push:
- paths-ignore:
- - 'docs/**'
- pull_request:
-
-jobs:
- windows:
- 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_CXX_COMPILER=cl.exe -DCMAKE_C_COMPILER=cl.exe -DUSE_WS=1 -DUSE_TEST=1 -DUSE_ZLIB=OFF -DBUILD_SHARED_LIBS=OFF ..
- - run: |
- cd build
- ninja
- - run: |
- cd build
- ninja test
-
-#- run: ../build/test/ixwebsocket_unittest.exe
-# working-directory: test
diff --git a/extern/IXWebSocket-11.3.2/.github/workflows/unittest_windows_gcc.yml b/extern/IXWebSocket-11.3.2/.github/workflows/unittest_windows_gcc.yml
deleted file mode 100644
index 328cd6ecc3..0000000000
--- a/extern/IXWebSocket-11.3.2/.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: egor-tensin/setup-mingw@v2
- - 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/extern/IXWebSocket-11.3.2/.gitignore b/extern/IXWebSocket-11.3.2/.gitignore
deleted file mode 100644
index 892b7bf6d7..0000000000
--- a/extern/IXWebSocket-11.3.2/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-build
-*.pyc
-venv
-ixsnake/ixsnake/.certs/
-site/
-ws/.certs/
-ws/.srl
-ixhttpd
-makefile
-a.out
diff --git a/extern/IXWebSocket-11.3.2/.pre-commit-config.yaml b/extern/IXWebSocket-11.3.2/.pre-commit-config.yaml
deleted file mode 100644
index de81d1bd7e..0000000000
--- a/extern/IXWebSocket-11.3.2/.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/extern/IXWebSocket-11.3.2/CMake/FindDeflate.cmake b/extern/IXWebSocket-11.3.2/CMake/FindDeflate.cmake
deleted file mode 100644
index ebbd9fdf04..0000000000
--- a/extern/IXWebSocket-11.3.2/CMake/FindDeflate.cmake
+++ /dev/null
@@ -1,19 +0,0 @@
-# Find package structure taken from libcurl
-
-include(FindPackageHandleStandardArgs)
-
-find_path(DEFLATE_INCLUDE_DIRS libdeflate.h)
-find_library(DEFLATE_LIBRARY deflate)
-
-find_package_handle_standard_args(Deflate
- FOUND_VAR
- DEFLATE_FOUND
- REQUIRED_VARS
- DEFLATE_LIBRARY
- DEFLATE_INCLUDE_DIRS
- FAIL_MESSAGE
- "Could NOT find deflate"
-)
-
-set(DEFLATE_INCLUDE_DIRS ${DEFLATE_INCLUDE_DIRS})
-set(DEFLATE_LIBRARIES ${DEFLATE_LIBRARY})
diff --git a/extern/IXWebSocket-11.3.2/CMake/FindMbedTLS.cmake b/extern/IXWebSocket-11.3.2/CMake/FindMbedTLS.cmake
deleted file mode 100644
index b6ef63ab38..0000000000
--- a/extern/IXWebSocket-11.3.2/CMake/FindMbedTLS.cmake
+++ /dev/null
@@ -1,16 +0,0 @@
-find_path(MBEDTLS_INCLUDE_DIRS mbedtls/ssl.h)
-
-# mbedtls-3.0 changed headers files, and we need to ifdef'out a few things
-find_path(MBEDTLS_VERSION_GREATER_THAN_3 mbedtls/build_info.h)
-
-find_library(MBEDTLS_LIBRARY mbedtls)
-find_library(MBEDX509_LIBRARY mbedx509)
-find_library(MBEDCRYPTO_LIBRARY mbedcrypto)
-
-set(MBEDTLS_LIBRARIES "${MBEDTLS_LIBRARY}" "${MBEDX509_LIBRARY}" "${MBEDCRYPTO_LIBRARY}")
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(MbedTLS DEFAULT_MSG
- MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY)
-
-mark_as_advanced(MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY)
diff --git a/extern/IXWebSocket-11.3.2/CMake/FindSpdLog.cmake b/extern/IXWebSocket-11.3.2/CMake/FindSpdLog.cmake
deleted file mode 100644
index ffd2dba901..0000000000
--- a/extern/IXWebSocket-11.3.2/CMake/FindSpdLog.cmake
+++ /dev/null
@@ -1,19 +0,0 @@
-# Find package structure taken from libcurl
-
-include(FindPackageHandleStandardArgs)
-
-find_path(SPDLOG_INCLUDE_DIRS spdlog/spdlog.h)
-find_library(JSONCPP_LIBRARY spdlog)
-
-find_package_handle_standard_args(SPDLOG
- FOUND_VAR
- SPDLOG_FOUND
- REQUIRED_VARS
- SPDLOG_LIBRARY
- SPDLOG_INCLUDE_DIRS
- FAIL_MESSAGE
- "Could NOT find spdlog"
-)
-
-set(SPDLOG_INCLUDE_DIRS ${SPDLOG_INCLUDE_DIRS})
-set(SPDLOG_LIBRARIES ${SPDLOG_LIBRARY})
diff --git a/extern/IXWebSocket-11.3.2/CMakeLists.txt b/extern/IXWebSocket-11.3.2/CMakeLists.txt
deleted file mode 100644
index 72e5ac45d0..0000000000
--- a/extern/IXWebSocket-11.3.2/CMakeLists.txt
+++ /dev/null
@@ -1,302 +0,0 @@
-#
-# Author: Benjamin Sergeant
-# Copyright (c) 2018 Machine Zone, Inc. All rights reserved.
-#
-
-cmake_minimum_required(VERSION 3.4.1...3.17.2)
-set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}")
-
-project(ixwebsocket C CXX)
-
-set (CMAKE_CXX_STANDARD 11)
-set (CXX_STANDARD_REQUIRED ON)
-set (CMAKE_CXX_EXTENSIONS OFF)
-
-option (BUILD_DEMO OFF)
-
-if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
- set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-endif()
-
-if (UNIX)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
-endif()
-
-if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshorten-64-to-32")
-endif()
-
-set( IXWEBSOCKET_SOURCES
- ixwebsocket/IXBench.cpp
- ixwebsocket/IXCancellationRequest.cpp
- ixwebsocket/IXConnectionState.cpp
- ixwebsocket/IXDNSLookup.cpp
- ixwebsocket/IXExponentialBackoff.cpp
- ixwebsocket/IXGetFreePort.cpp
- ixwebsocket/IXGzipCodec.cpp
- ixwebsocket/IXHttp.cpp
- ixwebsocket/IXHttpClient.cpp
- ixwebsocket/IXHttpServer.cpp
- ixwebsocket/IXNetSystem.cpp
- ixwebsocket/IXSelectInterrupt.cpp
- ixwebsocket/IXSelectInterruptFactory.cpp
- ixwebsocket/IXSelectInterruptPipe.cpp
- ixwebsocket/IXSetThreadName.cpp
- ixwebsocket/IXSocket.cpp
- ixwebsocket/IXSocketConnect.cpp
- ixwebsocket/IXSocketFactory.cpp
- ixwebsocket/IXSocketServer.cpp
- ixwebsocket/IXSocketTLSOptions.cpp
- ixwebsocket/IXStrCaseCompare.cpp
- ixwebsocket/IXUdpSocket.cpp
- ixwebsocket/IXUrlParser.cpp
- ixwebsocket/IXUuid.cpp
- ixwebsocket/IXUserAgent.cpp
- ixwebsocket/IXWebSocket.cpp
- ixwebsocket/IXWebSocketCloseConstants.cpp
- ixwebsocket/IXWebSocketHandshake.cpp
- ixwebsocket/IXWebSocketHttpHeaders.cpp
- ixwebsocket/IXWebSocketPerMessageDeflate.cpp
- ixwebsocket/IXWebSocketPerMessageDeflateCodec.cpp
- ixwebsocket/IXWebSocketPerMessageDeflateOptions.cpp
- ixwebsocket/IXWebSocketProxyServer.cpp
- ixwebsocket/IXWebSocketServer.cpp
- ixwebsocket/IXWebSocketTransport.cpp
-)
-
-set( IXWEBSOCKET_HEADERS
- ixwebsocket/IXBench.h
- ixwebsocket/IXCancellationRequest.h
- ixwebsocket/IXConnectionState.h
- ixwebsocket/IXDNSLookup.h
- ixwebsocket/IXExponentialBackoff.h
- ixwebsocket/IXGetFreePort.h
- ixwebsocket/IXGzipCodec.h
- ixwebsocket/IXHttp.h
- ixwebsocket/IXHttpClient.h
- ixwebsocket/IXHttpServer.h
- ixwebsocket/IXNetSystem.h
- ixwebsocket/IXProgressCallback.h
- ixwebsocket/IXSelectInterrupt.h
- ixwebsocket/IXSelectInterruptFactory.h
- ixwebsocket/IXSelectInterruptPipe.h
- ixwebsocket/IXSetThreadName.h
- ixwebsocket/IXSocket.h
- ixwebsocket/IXSocketConnect.h
- ixwebsocket/IXSocketFactory.h
- ixwebsocket/IXSocketServer.h
- ixwebsocket/IXSocketTLSOptions.h
- ixwebsocket/IXStrCaseCompare.h
- ixwebsocket/IXUdpSocket.h
- ixwebsocket/IXUniquePtr.h
- ixwebsocket/IXUrlParser.h
- ixwebsocket/IXUuid.h
- ixwebsocket/IXUtf8Validator.h
- ixwebsocket/IXUserAgent.h
- ixwebsocket/IXWebSocket.h
- ixwebsocket/IXWebSocketCloseConstants.h
- ixwebsocket/IXWebSocketCloseInfo.h
- ixwebsocket/IXWebSocketErrorInfo.h
- ixwebsocket/IXWebSocketHandshake.h
- ixwebsocket/IXWebSocketHandshakeKeyGen.h
- ixwebsocket/IXWebSocketHttpHeaders.h
- ixwebsocket/IXWebSocketInitResult.h
- ixwebsocket/IXWebSocketMessage.h
- ixwebsocket/IXWebSocketMessageType.h
- ixwebsocket/IXWebSocketOpenInfo.h
- ixwebsocket/IXWebSocketPerMessageDeflate.h
- ixwebsocket/IXWebSocketPerMessageDeflateCodec.h
- ixwebsocket/IXWebSocketPerMessageDeflateOptions.h
- ixwebsocket/IXWebSocketProxyServer.h
- ixwebsocket/IXWebSocketSendInfo.h
- ixwebsocket/IXWebSocketServer.h
- ixwebsocket/IXWebSocketTransport.h
- ixwebsocket/IXWebSocketVersion.h
-)
-
-option(BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" OFF)
-option(USE_TLS "Enable TLS support" FALSE)
-
-if (USE_TLS)
- # default to securetranport on Apple if nothing is configured
- if (APPLE)
- if (NOT USE_MBED_TLS AND NOT USE_OPEN_SSL) # unless we want something else
- set(USE_SECURE_TRANSPORT ON)
- endif()
- # default to mbedtls on windows if nothing is configured
- elseif (WIN32)
- if (NOT USE_OPEN_SSL) # unless we want something else
- set(USE_MBED_TLS ON)
- endif()
- else() # default to OpenSSL on all other platforms
- if (NOT USE_MBED_TLS) # Unless mbedtls is requested
- set(USE_OPEN_SSL ON)
- endif()
- endif()
-
- if (USE_MBED_TLS)
- list( APPEND IXWEBSOCKET_HEADERS ixwebsocket/IXSocketMbedTLS.h)
- list( APPEND IXWEBSOCKET_SOURCES ixwebsocket/IXSocketMbedTLS.cpp)
- elseif (USE_SECURE_TRANSPORT)
- list( APPEND IXWEBSOCKET_HEADERS ixwebsocket/IXSocketAppleSSL.h)
- list( APPEND IXWEBSOCKET_SOURCES ixwebsocket/IXSocketAppleSSL.cpp)
- elseif (USE_OPEN_SSL)
- list( APPEND IXWEBSOCKET_HEADERS ixwebsocket/IXSocketOpenSSL.h)
- list( APPEND IXWEBSOCKET_SOURCES ixwebsocket/IXSocketOpenSSL.cpp)
- else()
- message(FATAL_ERROR "TLS Configuration error: unknown backend")
- endif()
-endif()
-
-add_library( ixwebsocket
- ${IXWEBSOCKET_SOURCES}
- ${IXWEBSOCKET_HEADERS}
-)
-
-if (USE_TLS)
- target_compile_definitions(ixwebsocket PUBLIC IXWEBSOCKET_USE_TLS)
- if (USE_MBED_TLS)
- target_compile_definitions(ixwebsocket PUBLIC IXWEBSOCKET_USE_MBED_TLS)
- elseif (USE_OPEN_SSL)
- target_compile_definitions(ixwebsocket PUBLIC IXWEBSOCKET_USE_OPEN_SSL)
- elseif (USE_SECURE_TRANSPORT)
- target_compile_definitions(ixwebsocket PUBLIC IXWEBSOCKET_USE_SECURE_TRANSPORT)
- else()
- message(FATAL_ERROR "TLS Configuration error: unknown backend")
- endif()
-endif()
-
-if (USE_TLS)
- if (USE_OPEN_SSL)
- message(STATUS "TLS configured to use openssl")
-
- # Help finding Homebrew's OpenSSL on macOS
- if (APPLE)
- set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /usr/local/opt/openssl/lib)
- set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} /usr/local/opt/openssl/include)
-
- # This is for MacPort OpenSSL 1.0
- # set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /opt/local/lib/openssl-1.0)
- # set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} /opt/local/include/openssl-1.0)
- endif()
-
- # This OPENSSL_FOUND check is to help find a cmake manually configured OpenSSL
- if (NOT OPENSSL_FOUND)
- find_package(OpenSSL REQUIRED)
- endif()
- message(STATUS "OpenSSL: " ${OPENSSL_VERSION})
-
- add_definitions(${OPENSSL_DEFINITIONS})
- target_include_directories(ixwebsocket PUBLIC $)
- target_link_libraries(ixwebsocket ${OPENSSL_LIBRARIES})
- elseif (USE_MBED_TLS)
- message(STATUS "TLS configured to use mbedtls")
-
- # This MBEDTLS_FOUND check is to help find a cmake manually configured MbedTLS
- if (NOT MBEDTLS_FOUND)
- find_package(MbedTLS REQUIRED)
-
- if (MBEDTLS_VERSION_GREATER_THAN_3)
- target_compile_definitions(ixwebsocket PRIVATE IXWEBSOCKET_USE_MBED_TLS_MIN_VERSION_3)
- endif()
-
- endif()
- target_include_directories(ixwebsocket PUBLIC $)
- target_link_libraries(ixwebsocket ${MBEDTLS_LIBRARIES})
- elseif (USE_SECURE_TRANSPORT)
- message(STATUS "TLS configured to use secure transport")
- target_link_libraries(ixwebsocket "-framework Foundation" "-framework Security")
- endif()
-endif()
-
-option(USE_ZLIB "Enable zlib support" TRUE)
-
-if (USE_ZLIB)
- # This ZLIB_FOUND check is to help find a cmake manually configured zlib
- if (NOT ZLIB_FOUND)
- find_package(ZLIB REQUIRED)
- endif()
- target_include_directories(ixwebsocket PUBLIC $)
- target_link_libraries(ixwebsocket ${ZLIB_LIBRARIES})
-
- target_compile_definitions(ixwebsocket PUBLIC IXWEBSOCKET_USE_ZLIB)
-endif()
-
-# brew install libdeflate
-find_package(Deflate)
-if (DEFLATE_FOUND)
- include_directories(${DEFLATE_INCLUDE_DIRS})
- target_link_libraries(ixwebsocket ${DEFLATE_LIBRARIES})
- target_compile_definitions(ixwebsocket PUBLIC IXWEBSOCKET_USE_DEFLATE)
-endif()
-
-if (WIN32)
- target_link_libraries(ixwebsocket wsock32 ws2_32 shlwapi)
- add_definitions(-D_CRT_SECURE_NO_WARNINGS)
-
- if (USE_TLS)
- target_link_libraries(ixwebsocket Crypt32)
- endif()
-endif()
-
-if (UNIX)
- find_package(Threads)
- target_link_libraries(ixwebsocket ${CMAKE_THREAD_LIBS_INIT})
-endif()
-
-
-set( IXWEBSOCKET_INCLUDE_DIRS
- ${CMAKE_CURRENT_SOURCE_DIR}
-)
-
-if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
- # Build with Multiple Processes
- target_compile_options(ixwebsocket PRIVATE /MP)
-endif()
-
-include(GNUInstallDirs)
-
-target_include_directories(ixwebsocket PUBLIC
- $
- $
-)
-
-set_target_properties(ixwebsocket PROPERTIES PUBLIC_HEADER "${IXWEBSOCKET_HEADERS}")
-
-option(IXWEBSOCKET_INSTALL "Install IXWebSocket" TRUE)
-
-if (IXWEBSOCKET_INSTALL)
- install(TARGETS ixwebsocket
- EXPORT ixwebsocket
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
- PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ixwebsocket/
- )
-
- install(EXPORT ixwebsocket
- FILE ixwebsocket-config.cmake
- NAMESPACE ixwebsocket::
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ixwebsocket)
-endif()
-
-if (USE_WS OR USE_TEST)
- include(FetchContent)
- FetchContent_Declare(spdlog
- GIT_REPOSITORY "https://github.com/gabime/spdlog"
- GIT_TAG "v1.8.0"
- GIT_SHALLOW 1)
-
- FetchContent_MakeAvailable(spdlog)
-
- if (USE_WS)
- add_subdirectory(ws)
- endif()
- if (USE_TEST)
- enable_testing()
- add_subdirectory(test)
- endif()
-endif()
-
-if (BUILD_DEMO)
- add_executable(demo main.cpp)
- target_link_libraries(demo ixwebsocket)
-endif()
diff --git a/extern/IXWebSocket-11.3.2/Dockerfile b/extern/IXWebSocket-11.3.2/Dockerfile
deleted file mode 120000
index 197ac830b3..0000000000
--- a/extern/IXWebSocket-11.3.2/Dockerfile
+++ /dev/null
@@ -1 +0,0 @@
-docker/Dockerfile.alpine
\ No newline at end of file
diff --git a/extern/IXWebSocket-11.3.2/LICENSE.txt b/extern/IXWebSocket-11.3.2/LICENSE.txt
deleted file mode 100644
index d32951a9cd..0000000000
--- a/extern/IXWebSocket-11.3.2/LICENSE.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-Copyright (c) 2018 Machine Zone, Inc. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the
- distribution.
-
-3. Neither the name of the copyright holder nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/extern/IXWebSocket-11.3.2/README.md b/extern/IXWebSocket-11.3.2/README.md
deleted file mode 100644
index 8f48931c54..0000000000
--- a/extern/IXWebSocket-11.3.2/README.md
+++ /dev/null
@@ -1,150 +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/extern/IXWebSocket-11.3.2/SECURITY.md b/extern/IXWebSocket-11.3.2/SECURITY.md
deleted file mode 100644
index 81aecf1594..0000000000
--- a/extern/IXWebSocket-11.3.2/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/extern/IXWebSocket-11.3.2/appveyor.yml b/extern/IXWebSocket-11.3.2/appveyor.yml
deleted file mode 100644
index 144facec27..0000000000
--- a/extern/IXWebSocket-11.3.2/appveyor.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-image:
-- Visual Studio 2017
-
-install:
-- cd C:\Tools\vcpkg
-- git pull
-- .\bootstrap-vcpkg.bat
-- cd %APPVEYOR_BUILD_FOLDER%
-- cmd: call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
-- vcpkg install zlib:x64-windows
-- vcpkg install mbedtls:x64-windows
-- mkdir build
-- cd build
-- cmake -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DUSE_WS=1 -DUSE_TEST=1 -DUSE_TLS=1 -G"NMake Makefiles" ..
-- nmake
-- cd ..
-- cd test
-- ..\build\test\ixwebsocket_unittest.exe
-
-cache: c:\tools\vcpkg\installed\
-
-build: off
diff --git a/extern/IXWebSocket-11.3.2/docker-compose.yml b/extern/IXWebSocket-11.3.2/docker-compose.yml
deleted file mode 100644
index 0caf0cb7f7..0000000000
--- a/extern/IXWebSocket-11.3.2/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/extern/IXWebSocket-11.3.2/docker/Dockerfile.alpine b/extern/IXWebSocket-11.3.2/docker/Dockerfile.alpine
deleted file mode 100644
index e42528f0a1..0000000000
--- a/extern/IXWebSocket-11.3.2/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/extern/IXWebSocket-11.3.2/docker/Dockerfile.centos b/extern/IXWebSocket-11.3.2/docker/Dockerfile.centos
deleted file mode 100644
index 06757cf703..0000000000
--- a/extern/IXWebSocket-11.3.2/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/extern/IXWebSocket-11.3.2/docker/Dockerfile.centos7 b/extern/IXWebSocket-11.3.2/docker/Dockerfile.centos7
deleted file mode 100644
index adf5c651d5..0000000000
--- a/extern/IXWebSocket-11.3.2/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/extern/IXWebSocket-11.3.2/docker/Dockerfile.debian b/extern/IXWebSocket-11.3.2/docker/Dockerfile.debian
deleted file mode 100644
index 9e885e59d6..0000000000
--- a/extern/IXWebSocket-11.3.2/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/extern/IXWebSocket-11.3.2/docker/Dockerfile.fedora b/extern/IXWebSocket-11.3.2/docker/Dockerfile.fedora
deleted file mode 100644
index d1966fc643..0000000000
--- a/extern/IXWebSocket-11.3.2/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/extern/IXWebSocket-11.3.2/docker/Dockerfile.ubuntu_bionic b/extern/IXWebSocket-11.3.2/docker/Dockerfile.ubuntu_bionic
deleted file mode 100644
index 28221079fb..0000000000
--- a/extern/IXWebSocket-11.3.2/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/extern/IXWebSocket-11.3.2/docker/Dockerfile.ubuntu_disco b/extern/IXWebSocket-11.3.2/docker/Dockerfile.ubuntu_disco
deleted file mode 100644
index c60230ad1b..0000000000
--- a/extern/IXWebSocket-11.3.2/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/extern/IXWebSocket-11.3.2/docker/Dockerfile.ubuntu_groovy b/extern/IXWebSocket-11.3.2/docker/Dockerfile.ubuntu_groovy
deleted file mode 100644
index a5e45a1b6e..0000000000
--- a/extern/IXWebSocket-11.3.2/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/extern/IXWebSocket-11.3.2/docker/Dockerfile.ubuntu_precise b/extern/IXWebSocket-11.3.2/docker/Dockerfile.ubuntu_precise
deleted file mode 100644
index da72e6dbe5..0000000000
--- a/extern/IXWebSocket-11.3.2/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/extern/IXWebSocket-11.3.2/docker/Dockerfile.ubuntu_trusty b/extern/IXWebSocket-11.3.2/docker/Dockerfile.ubuntu_trusty
deleted file mode 100644
index a0701e1e0b..0000000000
--- a/extern/IXWebSocket-11.3.2/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/extern/IXWebSocket-11.3.2/docker/Dockerfile.ubuntu_xenial b/extern/IXWebSocket-11.3.2/docker/Dockerfile.ubuntu_xenial
deleted file mode 100644
index f13652d0cd..0000000000
--- a/extern/IXWebSocket-11.3.2/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/extern/IXWebSocket-11.3.2/docs/CHANGELOG.md b/extern/IXWebSocket-11.3.2/docs/CHANGELOG.md
deleted file mode 100644
index 4bd4c69d02..0000000000
--- a/extern/IXWebSocket-11.3.2/docs/CHANGELOG.md
+++ /dev/null
@@ -1,1210 +0,0 @@
-# Changelog
-
-All changes to this project will be documented in this file.
-
-## [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/extern/IXWebSocket-11.3.2/docs/build.md b/extern/IXWebSocket-11.3.2/docs/build.md
deleted file mode 100644
index 09c6f4dd45..0000000000
--- a/extern/IXWebSocket-11.3.2/docs/build.md
+++ /dev/null
@@ -1,93 +0,0 @@
-## Build
-
-### 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 # make a build dir so that you can build out of tree.
-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 NOTFOUNS
-
-```
-
-### Conan
-
-[  ](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/extern/IXWebSocket-11.3.2/docs/design.md b/extern/IXWebSocket-11.3.2/docs/design.md
deleted file mode 100644
index 5c3dbb1339..0000000000
--- a/extern/IXWebSocket-11.3.2/docs/design.md
+++ /dev/null
@@ -1,82 +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. However concurrent writes need to be protected with mutex.
-
-### 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.
-
-* Linux
-* macOS with thread sanitizer
-* macOS, with OpenSSL, with thread sanitizer
-* macOS, with MbedTLS, with thread sanitizer
-* Windows, with MbedTLS (the unittest is not run yet)
-
-## 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/extern/IXWebSocket-11.3.2/docs/index.md b/extern/IXWebSocket-11.3.2/docs/index.md
deleted file mode 100644
index 0f1f5a01e0..0000000000
--- a/extern/IXWebSocket-11.3.2/docs/index.md
+++ /dev/null
@@ -1,64 +0,0 @@
-## Introduction
-
-[*WebSocket*](https://en.wikipedia.org/wiki/WebSocket) is a computer communications protocol, providing full-duplex and bi-directionnal communication channels over a single TCP connection. *IXWebSocket* is a C++ library for client and server Websocket communication, and for client and server HTTP communication. *TLS* aka *SSL* is supported. The code is derived from [easywsclient](https://github.com/dhbaird/easywsclient) and from the [Satori C SDK](https://github.com/satori-com/satori-rtm-sdk-c). It has been tested on the following platforms.
-
-* macOS
-* iOS
-* Linux
-* Android
-* Windows
-* FreeBSD
-
-## Example code
-
-```c++
-// Required on Windows
-ix::initNetSystem();
-
-// Our websocket object
-ix::WebSocket webSocket;
-
-std::string url("ws://localhost:8080/");
-webSocket.setUrl(url);
-
-// 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");
-```
-
-## Why another library?
-
-There are 2 main reasons that explain why IXWebSocket got written. First, we needed a C++ cross-platform client library, which should have few dependencies. What looked like the most solid one, [websocketpp](https://github.com/zaphoyd/websocketpp) did depend on boost and this was not an option for us. Secondly, there were other available libraries with fewer dependencies (C ones), but they required calling an explicit poll routine periodically to know if a client had received data from a server, which was not elegant.
-
-We started by solving those 2 problems, then we added server websocket code, then an HTTP client, and finally a very simple HTTP server. IXWebSocket comes with a command line utility named ws which is quite handy, and is now packaged with alpine linux. You can install it with `apk add ws`.
-
-* Few dependencies (only zlib)
-* Simple to use ; uses std::string and std::function callbacks.
-* Complete support of the websocket protocol, and basic http support.
-* Client and Server
-* TLS support
-
-## 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
-
-## Contributing
-
-IXWebSocket is developed on [GitHub](https://github.com/machinezone/IXWebSocket). We'd love to hear about how you use it; opening up an issue on GitHub is ok for that. 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.
diff --git a/extern/IXWebSocket-11.3.2/docs/packages.md b/extern/IXWebSocket-11.3.2/docs/packages.md
deleted file mode 100644
index e1a307db2d..0000000000
--- a/extern/IXWebSocket-11.3.2/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/extern/IXWebSocket-11.3.2/docs/performance.md b/extern/IXWebSocket-11.3.2/docs/performance.md
deleted file mode 100644
index 3720bc5977..0000000000
--- a/extern/IXWebSocket-11.3.2/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/extern/IXWebSocket-11.3.2/docs/usage.md b/extern/IXWebSocket-11.3.2/docs/usage.md
deleted file mode 100644
index 2744e2b3ef..0000000000
--- a/extern/IXWebSocket-11.3.2/docs/usage.md
+++ /dev/null
@@ -1,614 +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 enabled by default. You can tweak its parameters or disable it
-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;
- });
-```
-
-### 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->eventInfo.retries << std::endl;
- ss << "Wait time(ms): " << msg->eventInfo.wait_time << std::endl;
- ss << "HTTP Status: " << msg->eventInfo.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.
-ix::WebSocketServer server(port);
-
-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.
-ix::WebSocketServer server(port);
-
-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();
-
-```
-
-## 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
diff --git a/extern/IXWebSocket-11.3.2/docs/ws.md b/extern/IXWebSocket-11.3.2/docs/ws.md
deleted file mode 100644
index 348e2bafaf..0000000000
--- a/extern/IXWebSocket-11.3.2/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/extern/IXWebSocket-11.3.2/httpd.cpp b/extern/IXWebSocket-11.3.2/httpd.cpp
deleted file mode 100644
index b1e580f16f..0000000000
--- a/extern/IXWebSocket-11.3.2/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/extern/IXWebSocket-11.3.2/ixwebsocket/IXBench.cpp b/extern/IXWebSocket-11.3.2/ixwebsocket/IXBench.cpp
deleted file mode 100644
index 75497f8553..0000000000
--- a/extern/IXWebSocket-11.3.2/ixwebsocket/IXBench.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * IXBench.cpp
- * Author: Benjamin Sergeant
- * Copyright (c) 2017-2020 Machine Zone, Inc. All rights reserved.
- */
-
-#include "IXBench.h"
-
-#include
-
-namespace ix
-{
- Bench::Bench(const std::string& description)
- : _description(description)
- {
- reset();
- }
-
- Bench::~Bench()
- {
- if (!_reported)
- {
- report();
- }
- }
-
- void Bench::reset()
- {
- _start = std::chrono::high_resolution_clock::now();
- _reported = false;
- }
-
- void Bench::report()
- {
- auto now = std::chrono::high_resolution_clock::now();
- auto microseconds = std::chrono::duration_cast(now - _start);
-
- _duration = microseconds.count();
- std::cerr << _description << " completed in " << _duration << " us" << std::endl;
-
- setReported();
- }
-
- void Bench::record()
- {
- auto now = std::chrono::high_resolution_clock::now();
- auto microseconds = std::chrono::duration_cast(now - _start);
-
- _duration = microseconds.count();
- }
-
- void Bench::setReported()
- {
- _reported = true;
- }
-
- uint64_t Bench::getDuration() const
- {
- return _duration;
- }
-} // namespace ix
diff --git a/extern/IXWebSocket-11.3.2/ixwebsocket/IXBench.h b/extern/IXWebSocket-11.3.2/ixwebsocket/IXBench.h
deleted file mode 100644
index c4f904b799..0000000000
--- a/extern/IXWebSocket-11.3.2/ixwebsocket/IXBench.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * IXBench.h
- * Author: Benjamin Sergeant
- * Copyright (c) 2017-2020 Machine Zone, Inc. All rights reserved.
- */
-#pragma once
-
-#include
-#include
-#include
-
-namespace ix
-{
- class Bench
- {
- public:
- Bench(const std::string& description);
- ~Bench();
-
- void reset();
- void record();
- void report();
- void setReported();
- uint64_t getDuration() const;
-
- private:
- std::string _description;
- std::chrono::time_point _start;
- uint64_t _duration;
- bool _reported;
- };
-} // namespace ix
diff --git a/extern/IXWebSocket-11.3.2/ixwebsocket/IXCancellationRequest.cpp b/extern/IXWebSocket-11.3.2/ixwebsocket/IXCancellationRequest.cpp
deleted file mode 100644
index fc43e4f00d..0000000000
--- a/extern/IXWebSocket-11.3.2/ixwebsocket/IXCancellationRequest.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * IXCancellationRequest.cpp
- * Author: Benjamin Sergeant
- * Copyright (c) 2019 Machine Zone, Inc. All rights reserved.
- */
-
-#include "IXCancellationRequest.h"
-
-#include
-#include
-
-namespace ix
-{
- CancellationRequest makeCancellationRequestWithTimeout(
- int secs, std::atomic& requestInitCancellation)
- {
- assert(secs > 0);
-
- auto start = std::chrono::system_clock::now();
- auto timeout = std::chrono::seconds(secs);
-
- auto isCancellationRequested = [&requestInitCancellation, start, timeout]() -> bool {
- // Was an explicit cancellation requested ?
- if (requestInitCancellation) return true;
-
- auto now = std::chrono::system_clock::now();
- if ((now - start) > timeout) return true;
-
- // No cancellation request
- return false;
- };
-
- return isCancellationRequested;
- }
-} // namespace ix
diff --git a/extern/IXWebSocket-11.3.2/ixwebsocket/IXCancellationRequest.h b/extern/IXWebSocket-11.3.2/ixwebsocket/IXCancellationRequest.h
deleted file mode 100644
index 8b0547d808..0000000000
--- a/extern/IXWebSocket-11.3.2/ixwebsocket/IXCancellationRequest.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * IXCancellationRequest.h
- * Author: Benjamin Sergeant
- * Copyright (c) 2018 Machine Zone, Inc. All rights reserved.
- */
-
-#pragma once
-
-#include
-#include
-
-namespace ix
-{
- using CancellationRequest = std::function;
-
- CancellationRequest makeCancellationRequestWithTimeout(
- int seconds, std::atomic& requestInitCancellation);
-} // namespace ix
diff --git a/extern/IXWebSocket-11.3.2/ixwebsocket/IXConnectionState.cpp b/extern/IXWebSocket-11.3.2/ixwebsocket/IXConnectionState.cpp
deleted file mode 100644
index 8a559f1919..0000000000
--- a/extern/IXWebSocket-11.3.2/ixwebsocket/IXConnectionState.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * IXConnectionState.cpp
- * Author: Benjamin Sergeant
- * Copyright (c) 2019 Machine Zone, Inc. All rights reserved.
- */
-
-#include "IXConnectionState.h"
-
-namespace ix
-{
- std::atomic ConnectionState::_globalId(0);
-
- ConnectionState::ConnectionState()
- : _terminated(false)
- {
- computeId();
- }
-
- void ConnectionState::computeId()
- {
- _id = std::to_string(_globalId++);
- }
-
- const std::string& ConnectionState::getId() const
- {
- return _id;
- }
-
- std::shared_ptr ConnectionState::createConnectionState()
- {
- return std::make_shared();
- }
-
- void ConnectionState::setOnSetTerminatedCallback(const OnSetTerminatedCallback& callback)
- {
- _onSetTerminatedCallback = callback;
- }
-
- bool ConnectionState::isTerminated() const
- {
- return _terminated;
- }
-
- void ConnectionState::setTerminated()
- {
- _terminated = true;
-
- if (_onSetTerminatedCallback)
- {
- _onSetTerminatedCallback();
- }
- }
-
- const std::string& ConnectionState::getRemoteIp()
- {
- return _remoteIp;
- }
-
- int ConnectionState::getRemotePort()
- {
- return _remotePort;
- }
-
- void ConnectionState::setRemoteIp(const std::string& remoteIp)
- {
- _remoteIp = remoteIp;
- }
-
- void ConnectionState::setRemotePort(int remotePort)
- {
- _remotePort = remotePort;
- }
-} // namespace ix
diff --git a/extern/IXWebSocket-11.3.2/ixwebsocket/IXConnectionState.h b/extern/IXWebSocket-11.3.2/ixwebsocket/IXConnectionState.h
deleted file mode 100644
index b7530d0b19..0000000000
--- a/extern/IXWebSocket-11.3.2/ixwebsocket/IXConnectionState.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * IXConnectionState.h
- * Author: Benjamin Sergeant
- * Copyright (c) 2019 Machine Zone, Inc. All rights reserved.
- */
-
-#pragma once
-
-#include
-#include
-#include
-#include
-#include
-
-namespace ix
-{
- using OnSetTerminatedCallback = std::function;
-
- class ConnectionState
- {
- public:
- ConnectionState();
- virtual ~ConnectionState() = default;
-
- virtual void computeId();
- virtual const std::string& getId() const;
-
- void setTerminated();
- bool isTerminated() const;
-
- const std::string& getRemoteIp();
- int getRemotePort();
-
- static std::shared_ptr createConnectionState();
-
- private:
- void setOnSetTerminatedCallback(const OnSetTerminatedCallback& callback);
-
- void setRemoteIp(const std::string& remoteIp);
- void setRemotePort(int remotePort);
-
- protected:
- std::atomic _terminated;
- std::string _id;
- OnSetTerminatedCallback _onSetTerminatedCallback;
-
- static std::atomic _globalId;
-
- std::string _remoteIp;
- int _remotePort;
-
- friend class SocketServer;
- };
-} // namespace ix
diff --git a/extern/IXWebSocket-11.3.2/ixwebsocket/IXDNSLookup.cpp b/extern/IXWebSocket-11.3.2/ixwebsocket/IXDNSLookup.cpp
deleted file mode 100644
index 9a2874f18c..0000000000
--- a/extern/IXWebSocket-11.3.2/ixwebsocket/IXDNSLookup.cpp
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * IXDNSLookup.cpp
- * Author: Benjamin Sergeant
- * Copyright (c) 2018 Machine Zone, Inc. All rights reserved.
- */
-
-//
-// On Windows Universal Platform (uwp), gai_strerror defaults behavior is to returns wchar_t
-// which is different from all other platforms. We want the non unicode version.
-// See https://github.com/microsoft/vcpkg/pull/11030
-// We could do this in IXNetSystem.cpp but so far we are only using gai_strerror in here.
-//
-#ifdef _UNICODE
-#undef _UNICODE
-#endif
-#ifdef UNICODE
-#undef UNICODE
-#endif
-
-#include "IXDNSLookup.h"
-
-#include "IXNetSystem.h"
-#include
-#include
-#include
-
-// mingw build quirks
-#if defined(_WIN32) && defined(__GNUC__)
-#define AI_NUMERICSERV NI_NUMERICSERV
-#define AI_ADDRCONFIG LUP_ADDRCONFIG
-#endif
-
-namespace ix
-{
- const int64_t DNSLookup::kDefaultWait = 1; // ms
-
- DNSLookup::DNSLookup(const std::string& hostname, int port, int64_t wait)
- : _hostname(hostname)
- , _port(port)
- , _wait(wait)
- , _res(nullptr)
- , _done(false)
- {
- ;
- }
-
- struct addrinfo* DNSLookup::getAddrInfo(const std::string& hostname,
- int port,
- std::string& errMsg)
- {
- struct addrinfo hints;
- memset(&hints, 0, sizeof(hints));
- hints.ai_flags = AI_ADDRCONFIG | AI_NUMERICSERV;
- hints.ai_family = AF_UNSPEC;
- hints.ai_socktype = SOCK_STREAM;
-
- std::string sport = std::to_string(port);
-
- struct addrinfo* res;
- int getaddrinfo_result = getaddrinfo(hostname.c_str(), sport.c_str(), &hints, &res);
- if (getaddrinfo_result)
- {
- errMsg = gai_strerror(getaddrinfo_result);
- res = nullptr;
- }
- return res;
- }
-
- struct addrinfo* DNSLookup::resolve(std::string& errMsg,
- const CancellationRequest& isCancellationRequested,
- bool cancellable)
- {
- return cancellable ? resolveCancellable(errMsg, isCancellationRequested)
- : resolveUnCancellable(errMsg, isCancellationRequested);
- }
-
- void DNSLookup::release(struct addrinfo* addr)
- {
- freeaddrinfo(addr);
- }
-
- struct addrinfo* DNSLookup::resolveUnCancellable(
- std::string& errMsg, const CancellationRequest& isCancellationRequested)
- {
- errMsg = "no error";
-
- // Maybe a cancellation request got in before the background thread terminated ?
- if (isCancellationRequested())
- {
- errMsg = "cancellation requested";
- return nullptr;
- }
-
- return getAddrInfo(_hostname, _port, errMsg);
- }
-
- struct addrinfo* DNSLookup::resolveCancellable(
- std::string& errMsg, const CancellationRequest& isCancellationRequested)
- {
- errMsg = "no error";
-
- // Can only be called once, otherwise we would have to manage a pool
- // of background thread which is overkill for our usage.
- if (_done)
- {
- return nullptr; // programming error, create a second DNSLookup instance
- // if you need a second lookup.
- }
-
- //
- // Good resource on thread forced termination
- // https://www.bo-yang.net/2017/11/19/cpp-kill-detached-thread
- //
- auto ptr = shared_from_this();
- std::weak_ptr self(ptr);
-
- int port = _port;
- std::string hostname(_hostname);
-
- // We make the background thread doing the work a shared pointer
- // instead of a member variable, because it can keep running when
- // this object goes out of scope, in case of cancellation
- auto t = std::make_shared(&DNSLookup::run, this, self, hostname, port);
- t->detach();
-
- while (!_done)
- {
- // Wait for 1 milliseconds, to see if the bg thread has terminated.
- // We do not use a condition variable to wait, as destroying this one
- // if the bg thread is alive can cause undefined behavior.
- std::this_thread::sleep_for(std::chrono::milliseconds(_wait));
-
- // Were we cancelled ?
- if (isCancellationRequested())
- {
- errMsg = "cancellation requested";
- return nullptr;
- }
- }
-
- // Maybe a cancellation request got in before the bg terminated ?
- if (isCancellationRequested())
- {
- errMsg = "cancellation requested";
- return nullptr;
- }
-
- errMsg = getErrMsg();
- return getRes();
- }
-
- void DNSLookup::run(std::weak_ptr self,
- std::string hostname,
- int port) // thread runner
- {
- // We don't want to read or write into members variables of an object that could be
- // gone, so we use temporary variables (res) or we pass in by copy everything that
- // getAddrInfo needs to work.
- std::string errMsg;
- struct addrinfo* res = getAddrInfo(hostname, port, errMsg);
-
- if (auto lock = self.lock())
- {
- // Copy result into the member variables
- setRes(res);
- setErrMsg(errMsg);
-
- _done = true;
- }
- }
-
- void DNSLookup::setErrMsg(const std::string& errMsg)
- {
- std::lock_guard lock(_errMsgMutex);
- _errMsg = errMsg;
- }
-
- const std::string& DNSLookup::getErrMsg()
- {
- std::lock_guard lock(_errMsgMutex);
- return _errMsg;
- }
-
- void DNSLookup::setRes(struct addrinfo* addr)
- {
- std::lock_guard lock(_resMutex);
- _res = addr;
- }
-
- struct addrinfo* DNSLookup::getRes()
- {
- std::lock_guard lock(_resMutex);
- return _res;
- }
-} // namespace ix
diff --git a/extern/IXWebSocket-11.3.2/ixwebsocket/IXDNSLookup.h b/extern/IXWebSocket-11.3.2/ixwebsocket/IXDNSLookup.h
deleted file mode 100644
index fcdd103d39..0000000000
--- a/extern/IXWebSocket-11.3.2/ixwebsocket/IXDNSLookup.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * IXDNSLookup.h
- * Author: Benjamin Sergeant
- * Copyright (c) 2018 Machine Zone, Inc. All rights reserved.
- *
- * Resolve a hostname+port to a struct addrinfo obtained with getaddrinfo
- * Does this in a background thread so that it can be cancelled, since
- * getaddrinfo is a blocking call, and we don't want to block the main thread on Mobile.
- */
-
-#pragma once
-
-#include "IXCancellationRequest.h"
-#include
-#include
-#include
-#include
-#include
-
-struct addrinfo;
-
-namespace ix
-{
- class DNSLookup : public std::enable_shared_from_this
- {
- public:
- DNSLookup(const std::string& hostname, int port, int64_t wait = DNSLookup::kDefaultWait);
- ~DNSLookup() = default;
-
- struct addrinfo* resolve(std::string& errMsg,
- const CancellationRequest& isCancellationRequested,
- bool cancellable = true);
-
- void release(struct addrinfo* addr);
-
- private:
- struct addrinfo* resolveCancellable(std::string& errMsg,
- const CancellationRequest& isCancellationRequested);
- struct addrinfo* resolveUnCancellable(std::string& errMsg,
- const CancellationRequest& isCancellationRequested);
-
- static struct addrinfo* getAddrInfo(const std::string& hostname,
- int port,
- std::string& errMsg);
-
- void run(std::weak_ptr self, std::string hostname, int port); // thread runner
-
- void setErrMsg(const std::string& errMsg);
- const std::string& getErrMsg();
-
- void setRes(struct addrinfo* addr);
- struct addrinfo* getRes();
-
- std::string _hostname;
- int _port;
- int64_t _wait;
- const static int64_t kDefaultWait;
-
- struct addrinfo* _res;
- std::mutex _resMutex;
-
- std::string _errMsg;
- std::mutex _errMsgMutex;
-
- std::atomic _done;
- };
-} // namespace ix
diff --git a/extern/IXWebSocket-11.3.2/ixwebsocket/IXExponentialBackoff.cpp b/extern/IXWebSocket-11.3.2/ixwebsocket/IXExponentialBackoff.cpp
deleted file mode 100644
index 1bb57ee529..0000000000
--- a/extern/IXWebSocket-11.3.2/ixwebsocket/IXExponentialBackoff.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * IXExponentialBackoff.cpp
- * Author: Benjamin Sergeant
- * Copyright (c) 2017-2019 Machine Zone, Inc. All rights reserved.
- */
-
-#include "IXExponentialBackoff.h"
-
-#include
-
-namespace ix
-{
- uint32_t calculateRetryWaitMilliseconds(uint32_t retryCount,
- uint32_t maxWaitBetweenReconnectionRetries,
- uint32_t minWaitBetweenReconnectionRetries)
- {
- uint32_t waitTime = (retryCount < 26) ? (std::pow(2, retryCount) * 100) : 0;
-
- if (waitTime < minWaitBetweenReconnectionRetries)
- {
- waitTime = minWaitBetweenReconnectionRetries;
- }
-
- if (waitTime > maxWaitBetweenReconnectionRetries || waitTime == 0)
- {
- waitTime = maxWaitBetweenReconnectionRetries;
- }
-
- return waitTime;
- }
-} // namespace ix
diff --git a/extern/IXWebSocket-11.3.2/ixwebsocket/IXExponentialBackoff.h b/extern/IXWebSocket-11.3.2/ixwebsocket/IXExponentialBackoff.h
deleted file mode 100644
index 79e19e9fb6..0000000000
--- a/extern/IXWebSocket-11.3.2/ixwebsocket/IXExponentialBackoff.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * IXExponentialBackoff.h
- * Author: Benjamin Sergeant
- * Copyright (c) 2017-2019 Machine Zone, Inc. All rights reserved.
- */
-
-#pragma once
-
-#include
-
-namespace ix
-{
- uint32_t calculateRetryWaitMilliseconds(uint32_t retryCount,
- uint32_t maxWaitBetweenReconnectionRetries,
- uint32_t minWaitBetweenReconnectionRetries);
-} // namespace ix
diff --git a/extern/IXWebSocket-11.3.2/ixwebsocket/IXGetFreePort.cpp b/extern/IXWebSocket-11.3.2/ixwebsocket/IXGetFreePort.cpp
deleted file mode 100644
index e69e8d3dc7..0000000000
--- a/extern/IXWebSocket-11.3.2/ixwebsocket/IXGetFreePort.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * IXGetFreePort.cpp
- * Author: Benjamin Sergeant
- * Copyright (c) 2019 Machine Zone. All rights reserved.
- */
-
-// Using inet_addr will trigger an error on uwp without this
-// FIXME: use a different api
-#ifdef _WIN32
-#ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
-#define _WINSOCK_DEPRECATED_NO_WARNINGS
-#endif
-#endif
-
-#include "IXGetFreePort.h"
-
-#include
-#include
-#include
-#include
-
-namespace ix
-{
- int getAnyFreePortRandom()
- {
- std::random_device rd;
- std::uniform_int_distribution dist(1024 + 1, 65535);
-
- return dist(rd);
- }
-
- int getAnyFreePort()
- {
- socket_t sockfd;
- if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
- {
- return getAnyFreePortRandom();
- }
-
- int enable = 1;
- if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (char*) &enable, sizeof(enable)) < 0)
- {
- return getAnyFreePortRandom();
- }
-
- // Bind to port 0. This is the standard way to get a free port.
- struct sockaddr_in server; // server address information
- server.sin_family = AF_INET;
- server.sin_port = htons(0);
- server.sin_addr.s_addr = inet_addr("127.0.0.1");
-
- if (bind(sockfd, (struct sockaddr*) &server, sizeof(server)) < 0)
- {
- Socket::closeSocket(sockfd);
- return getAnyFreePortRandom();
- }
-
- struct sockaddr_in sa; // server address information
- socklen_t len = sizeof(sa);
- if (getsockname(sockfd, (struct sockaddr*) &sa, &len) < 0)
- {
- Socket::closeSocket(sockfd);
- return getAnyFreePortRandom();
- }
-
- int port = ntohs(sa.sin_port);
- Socket::closeSocket(sockfd);
-
- return port;
- }
-
- int getFreePort()
- {
- while (true)
- {
-#if defined(__has_feature)
-#if __has_feature(address_sanitizer)
- int port = getAnyFreePortRandom();
-#else
- int port = getAnyFreePort();
-#endif
-#else
- int port = getAnyFreePort();
-#endif
- //
- // Only port above 1024 can be used by non root users, but for some
- // reason I got port 7 returned with macOS when binding on port 0...
- //
- if (port > 1024)
- {
- return port;
- }
- }
-
- return -1;
- }
-} // namespace ix
diff --git a/extern/IXWebSocket-11.3.2/ixwebsocket/IXGetFreePort.h b/extern/IXWebSocket-11.3.2/ixwebsocket/IXGetFreePort.h
deleted file mode 100644
index 868faf5264..0000000000
--- a/extern/IXWebSocket-11.3.2/ixwebsocket/IXGetFreePort.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * IXGetFreePort.h
- * Author: Benjamin Sergeant
- * Copyright (c) 2019 Machine Zone. All rights reserved.
- */
-
-#pragma once
-
-namespace ix
-{
- int getFreePort();
-} // namespace ix
diff --git a/extern/IXWebSocket-11.3.2/ixwebsocket/IXGzipCodec.cpp b/extern/IXWebSocket-11.3.2/ixwebsocket/IXGzipCodec.cpp
deleted file mode 100644
index fe59bd65a1..0000000000
--- a/extern/IXWebSocket-11.3.2/ixwebsocket/IXGzipCodec.cpp
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * IXGzipCodec.cpp
- * Author: Benjamin Sergeant
- * Copyright (c) 2020 Machine Zone, Inc. All rights reserved.
- */
-
-#include "IXGzipCodec.h"
-
-#include "IXBench.h"
-#include
-#include
-
-#ifdef IXWEBSOCKET_USE_ZLIB
-#include
-#endif
-
-#ifdef IXWEBSOCKET_USE_DEFLATE
-#include
-#endif
-
-namespace ix
-{
- std::string gzipCompress(const std::string& str)
- {
-#ifndef IXWEBSOCKET_USE_ZLIB
- return std::string();
-#else
-#ifdef IXWEBSOCKET_USE_DEFLATE
- int compressionLevel = 6;
- struct libdeflate_compressor* compressor;
-
- compressor = libdeflate_alloc_compressor(compressionLevel);
-
- const void* uncompressed_data = str.data();
- size_t uncompressed_size = str.size();
- void* compressed_data;
- size_t actual_compressed_size;
- size_t max_compressed_size;
-
- max_compressed_size = libdeflate_gzip_compress_bound(compressor, uncompressed_size);
- compressed_data = malloc(max_compressed_size);
-
- if (compressed_data == NULL)
- {
- return std::string();
- }
-
- actual_compressed_size = libdeflate_gzip_compress(
- compressor, uncompressed_data, uncompressed_size, compressed_data, max_compressed_size);
-
- libdeflate_free_compressor(compressor);
-
- if (actual_compressed_size == 0)
- {
- free(compressed_data);
- return std::string();
- }
-
- std::string out;
- out.assign(reinterpret_cast(compressed_data), actual_compressed_size);
- free(compressed_data);
-
- return out;
-#else
- z_stream zs; // z_stream is zlib's control structure
- memset(&zs, 0, sizeof(zs));
-
- // deflateInit2 configure the file format: request gzip instead of deflate
- const int windowBits = 15;
- const int GZIP_ENCODING = 16;
-
- deflateInit2(&zs,
- Z_DEFAULT_COMPRESSION,
- Z_DEFLATED,
- windowBits | GZIP_ENCODING,
- 8,
- Z_DEFAULT_STRATEGY);
-
- zs.next_in = (Bytef*) str.data();
- zs.avail_in = (uInt) str.size(); // set the z_stream's input
-
- int ret;
- char outbuffer[32768];
- std::string outstring;
-
- // retrieve the compressed bytes blockwise
- do
- {
- zs.next_out = reinterpret_cast(outbuffer);
- zs.avail_out = sizeof(outbuffer);
-
- ret = deflate(&zs, Z_FINISH);
-
- if (outstring.size() < zs.total_out)
- {
- // append the block to the output string
- outstring.append(outbuffer, zs.total_out - outstring.size());
- }
- } while (ret == Z_OK);
-
- deflateEnd(&zs);
-
- return outstring;
-#endif // IXWEBSOCKET_USE_DEFLATE
-#endif // IXWEBSOCKET_USE_ZLIB
- }
-
-#ifdef IXWEBSOCKET_USE_DEFLATE
- static uint32_t loadDecompressedGzipSize(const uint8_t* p)
- {
- return ((uint32_t) p[0] << 0) | ((uint32_t) p[1] << 8) | ((uint32_t) p[2] << 16) |
- ((uint32_t) p[3] << 24);
- }
-#endif
-
- bool gzipDecompress(const std::string& in, std::string& out)
- {
-#ifndef IXWEBSOCKET_USE_ZLIB
- return false;
-#else
-#ifdef IXWEBSOCKET_USE_DEFLATE
- struct libdeflate_decompressor* decompressor;
- decompressor = libdeflate_alloc_decompressor();
-
- const void* compressed_data = in.data();
- size_t compressed_size = in.size();
-
- // Retrieve uncompressed size from the trailer of the gziped data
- const uint8_t* ptr = reinterpret_cast(&in.front());
- auto uncompressed_size = loadDecompressedGzipSize(&ptr[compressed_size - 4]);
-
- // Use it to redimension our output buffer
- out.resize(uncompressed_size);
-
- libdeflate_result result = libdeflate_gzip_decompress(
- decompressor, compressed_data, compressed_size, &out.front(), uncompressed_size, NULL);
-
- libdeflate_free_decompressor(decompressor);
- return result == LIBDEFLATE_SUCCESS;
-#else
- z_stream inflateState;
- memset(&inflateState, 0, sizeof(inflateState));
-
- inflateState.zalloc = Z_NULL;
- inflateState.zfree = Z_NULL;
- inflateState.opaque = Z_NULL;
- inflateState.avail_in = 0;
- inflateState.next_in = Z_NULL;
-
- if (inflateInit2(&inflateState, 16 + MAX_WBITS) != Z_OK)
- {
- return false;
- }
-
- inflateState.avail_in = (uInt) in.size();
- inflateState.next_in = (unsigned char*) (const_cast(in.data()));
-
- const int kBufferSize = 1 << 14;
- std::array compressBuffer;
-
- do
- {
- inflateState.avail_out = (uInt) kBufferSize;
- inflateState.next_out = &compressBuffer.front();
-
- int ret = inflate(&inflateState, Z_SYNC_FLUSH);
-
- if (ret == Z_NEED_DICT || ret == Z_DATA_ERROR || ret == Z_MEM_ERROR)
- {
- inflateEnd(&inflateState);
- return false;
- }
-
- out.append(reinterpret_cast(&compressBuffer.front()),
- kBufferSize - inflateState.avail_out);
- } while (inflateState.avail_out == 0);
-
- inflateEnd(&inflateState);
- return true;
-#endif // IXWEBSOCKET_USE_DEFLATE
-#endif // IXWEBSOCKET_USE_ZLIB
- }
-} // namespace ix
diff --git a/extern/IXWebSocket-11.3.2/ixwebsocket/IXGzipCodec.h b/extern/IXWebSocket-11.3.2/ixwebsocket/IXGzipCodec.h
deleted file mode 100644
index 8a5fc11306..0000000000
--- a/extern/IXWebSocket-11.3.2/ixwebsocket/IXGzipCodec.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * IXGzipCodec.h
- * Author: Benjamin Sergeant
- * Copyright (c) 2020 Machine Zone, Inc. All rights reserved.
- */
-
-#pragma once
-
-#include
-
-namespace ix
-{
- std::string gzipCompress(const std::string& str);
- bool gzipDecompress(const std::string& in, std::string& out);
-} // namespace ix
diff --git a/extern/IXWebSocket-11.3.2/ixwebsocket/IXHttp.cpp b/extern/IXWebSocket-11.3.2/ixwebsocket/IXHttp.cpp
deleted file mode 100644
index 46504026f3..0000000000
--- a/extern/IXWebSocket-11.3.2/ixwebsocket/IXHttp.cpp
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * IXHttp.cpp
- * Author: Benjamin Sergeant
- * Copyright (c) 2019 Machine Zone, Inc. All rights reserved.
- */
-
-#include "IXHttp.h"
-
-#include "IXCancellationRequest.h"
-#include "IXGzipCodec.h"
-#include "IXSocket.h"
-#include
-#include
-
-namespace ix
-{
- std::string Http::trim(const std::string& str)
- {
- std::string out;
- for (auto c : str)
- {
- if (c != ' ' && c != '\n' && c != '\r')
- {
- out += c;
- }
- }
-
- return out;
- }
-
- std::pair Http::parseStatusLine(const std::string& line)
- {
- // Request-Line = Method SP Request-URI SP HTTP-Version CRLF
- std::string token;
- std::stringstream tokenStream(line);
- std::vector tokens;
-
- // Split by ' '
- while (std::getline(tokenStream, token, ' '))
- {
- tokens.push_back(token);
- }
-
- std::string httpVersion;
- if (tokens.size() >= 1)
- {
- httpVersion = trim(tokens[0]);
- }
-
- int statusCode = -1;
- if (tokens.size() >= 2)
- {
- std::stringstream ss;
- ss << trim(tokens[1]);
- ss >> statusCode;
- }
-
- return std::make_pair(httpVersion, statusCode);
- }
-
- std::tuple Http::parseRequestLine(
- const std::string& line)
- {
- // Request-Line = Method SP Request-URI SP HTTP-Version CRLF
- std::string token;
- std::stringstream tokenStream(line);
- std::vector tokens;
-
- // Split by ' '
- while (std::getline(tokenStream, token, ' '))
- {
- tokens.push_back(token);
- }
-
- std::string method;
- if (tokens.size() >= 1)
- {
- method = trim(tokens[0]);
- }
-
- std::string requestUri;
- if (tokens.size() >= 2)
- {
- requestUri = trim(tokens[1]);
- }
-
- std::string httpVersion;
- if (tokens.size() >= 3)
- {
- httpVersion = trim(tokens[2]);
- }
-
- return std::make_tuple(method, requestUri, httpVersion);
- }
-
- std::tuple Http::parseRequest(
- std::unique_ptr& socket, int timeoutSecs)
- {
- HttpRequestPtr httpRequest;
-
- std::atomic requestInitCancellation(false);
-
- auto isCancellationRequested =
- makeCancellationRequestWithTimeout(timeoutSecs, requestInitCancellation);
-
- // Read first line
- auto lineResult = socket->readLine(isCancellationRequested);
- auto lineValid = lineResult.first;
- auto line = lineResult.second;
-
- if (!lineValid)
- {
- return std::make_tuple(false, "Error reading HTTP request line", httpRequest);
- }
-
- // Parse request line (GET /foo HTTP/1.1\r\n)
- auto requestLine = Http::parseRequestLine(line);
- auto method = std::get<0>(requestLine);
- auto uri = std::get<1>(requestLine);
- auto httpVersion = std::get<2>(requestLine);
-
- // Retrieve and validate HTTP headers
- auto result = parseHttpHeaders(socket, isCancellationRequested);
- auto headersValid = result.first;
- auto headers = result.second;
-
- if (!headersValid)
- {
- return std::make_tuple(false, "Error parsing HTTP headers", httpRequest);
- }
-
- std::string body;
- if (headers.find("Content-Length") != headers.end())
- {
- int contentLength = 0;
- try
- {
- contentLength = std::stoi(headers["Content-Length"]);
- }
- catch (const std::exception&)
- {
- return std::make_tuple(
- false, "Error parsing HTTP Header 'Content-Length'", httpRequest);
- }
-
- if (contentLength < 0)
- {
- return std::make_tuple(
- false, "Error: 'Content-Length' should be a positive integer", httpRequest);
- }
-
- auto res = socket->readBytes(contentLength, nullptr, nullptr, isCancellationRequested);
- if (!res.first)
- {
- return std::make_tuple(
- false, std::string("Error reading request: ") + res.second, httpRequest);
- }
- body = res.second;
- }
-
- // If the content was compressed with gzip, decode it
- if (headers["Content-Encoding"] == "gzip")
- {
-#ifdef IXWEBSOCKET_USE_ZLIB
- std::string decompressedPayload;
- if (!gzipDecompress(body, decompressedPayload))
- {
- return std::make_tuple(
- false, std::string("Error during gzip decompression of the body"), httpRequest);
- }
- body = decompressedPayload;
-#else
- std::string errorMsg("ixwebsocket was not compiled with gzip support on");
- return std::make_tuple(false, errorMsg, httpRequest);
-#endif
- }
-
- httpRequest = std::make_shared(uri, method, httpVersion, body, headers);
- return std::make_tuple(true, "", httpRequest);
- }
-
- bool Http::sendResponse(HttpResponsePtr response, std::unique_ptr& socket)
- {
- // Write the response to the socket
- std::stringstream ss;
- ss << "HTTP/1.1 ";
- ss << response->statusCode;
- ss << " ";
- ss << response->description;
- ss << "\r\n";
-
- if (!socket->writeBytes(ss.str(), nullptr))
- {
- return false;
- }
-
- // Write headers
- ss.str("");
- ss << "Content-Length: " << response->body.size() << "\r\n";
- for (auto&& it : response->headers)
- {
- ss << it.first << ": " << it.second << "\r\n";
- }
- ss << "\r\n";
-
- if (!socket->writeBytes(ss.str(), nullptr))
- {
- return false;
- }
-
- return response->body.empty() ? true : socket->writeBytes(response->body, nullptr);
- }
-} // namespace ix
diff --git a/extern/IXWebSocket-11.3.2/ixwebsocket/IXHttp.h b/extern/IXWebSocket-11.3.2/ixwebsocket/IXHttp.h
deleted file mode 100644
index 2cf4f29d5f..0000000000
--- a/extern/IXWebSocket-11.3.2/ixwebsocket/IXHttp.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * IXHttp.h
- * Author: Benjamin Sergeant
- * Copyright (c) 2019 Machine Zone, Inc. All rights reserved.
- */
-
-#pragma once
-
-#include "IXProgressCallback.h"
-#include "IXWebSocketHttpHeaders.h"
-#include
-#include
-#include
-
-namespace ix
-{
- enum class HttpErrorCode : int
- {
- Ok = 0,
- CannotConnect = 1,
- Timeout = 2,
- Gzip = 3,
- UrlMalformed = 4,
- CannotCreateSocket = 5,
- SendError = 6,
- ReadError = 7,
- CannotReadStatusLine = 8,
- MissingStatus = 9,
- HeaderParsingError = 10,
- MissingLocation = 11,
- TooManyRedirects = 12,
- ChunkReadError = 13,
- CannotReadBody = 14,
- Cancelled = 15,
- Invalid = 100
- };
-
- struct HttpResponse
- {
- int statusCode;
- std::string description;
- HttpErrorCode errorCode;
- WebSocketHttpHeaders headers;
- std::string body;
- std::string errorMsg;
- uint64_t uploadSize;
- uint64_t downloadSize;
-
- HttpResponse(int s = 0,
- const std::string& des = std::string(),
- const HttpErrorCode& c = HttpErrorCode::Ok,
- const WebSocketHttpHeaders& h = WebSocketHttpHeaders(),
- const std::string& b = std::string(),
- const std::string& e = std::string(),
- uint64_t u = 0,
- uint64_t d = 0)
- : statusCode(s)
- , description(des)
- , errorCode(c)
- , headers(h)
- , body(b)
- , errorMsg(e)
- , uploadSize(u)
- , downloadSize(d)
- {
- ;
- }
- };
-
- using HttpResponsePtr = std::shared_ptr;
- using HttpParameters = std::unordered_map;
- using HttpFormDataParameters = std::unordered_map;
- using Logger = std::function;
- using OnResponseCallback = std::function;
-
- struct HttpRequestArgs
- {
- std::string url;
- std::string verb;
- WebSocketHttpHeaders extraHeaders;
- std::string body;
- std::string multipartBoundary;
- int connectTimeout = 60;
- int transferTimeout = 1800;
- bool followRedirects = true;
- int maxRedirects = 5;
- bool verbose = false;
- bool compress = true;
- bool compressRequest = false;
- Logger logger;
- OnProgressCallback onProgressCallback;
- OnChunkCallback onChunkCallback;
- std::atomic cancel;
- };
-
- using HttpRequestArgsPtr = std::shared_ptr;
-
- struct HttpRequest
- {
- std::string uri;
- std::string method;
- std::string version;
- std::string body;
- WebSocketHttpHeaders headers;
-
- HttpRequest(const std::string& u,
- const std::string& m,
- const std::string& v,
- const std::string& b,
- const WebSocketHttpHeaders& h = WebSocketHttpHeaders())
- : uri(u)
- , method(m)
- , version(v)
- , body(b)
- , headers(h)
- {
- }
- };
-
- using HttpRequestPtr = std::shared_ptr;
-
- class Http
- {
- public:
- static std::tuple parseRequest(
- std::unique_ptr& socket, int timeoutSecs);
- static bool sendResponse(HttpResponsePtr response, std::unique_ptr& socket);
-
- static std::pair parseStatusLine(const std::string& line);
- static std::tuple parseRequestLine(
- const std::string& line);
- static std::string trim(const std::string& str);
- };
-} // namespace ix
diff --git a/extern/IXWebSocket-11.3.2/ixwebsocket/IXHttpClient.cpp b/extern/IXWebSocket-11.3.2/ixwebsocket/IXHttpClient.cpp
deleted file mode 100644
index 00cd95272c..0000000000
--- a/extern/IXWebSocket-11.3.2/ixwebsocket/IXHttpClient.cpp
+++ /dev/null
@@ -1,772 +0,0 @@
-/*
- * IXHttpClient.cpp
- * Author: Benjamin Sergeant
- * Copyright (c) 2019 Machine Zone, Inc. All rights reserved.
- */
-
-#include "IXHttpClient.h"
-
-#include "IXGzipCodec.h"
-#include "IXSocketFactory.h"
-#include "IXUrlParser.h"
-#include "IXUserAgent.h"
-#include "IXWebSocketHttpHeaders.h"
-#include
-#include
-#include
-#include
-#include
-#include
-
-namespace ix
-{
- // https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods
- const std::string HttpClient::kPost = "POST";
- const std::string HttpClient::kGet = "GET";
- const std::string HttpClient::kHead = "HEAD";
- const std::string HttpClient::kDelete = "DELETE";
- const std::string HttpClient::kPut = "PUT";
- const std::string HttpClient::kPatch = "PATCH";
-
- HttpClient::HttpClient(bool async)
- : _async(async)
- , _stop(false)
- , _forceBody(false)
- {
- if (!_async) return;
-
- _thread = std::thread(&HttpClient::run, this);
- }
-
- HttpClient::~HttpClient()
- {
- if (!_thread.joinable()) return;
-
- _stop = true;
- _condition.notify_one();
- _thread.join();
- }
-
- void HttpClient::setTLSOptions(const SocketTLSOptions& tlsOptions)
- {
- _tlsOptions = tlsOptions;
- }
-
- void HttpClient::setForceBody(bool value)
- {
- _forceBody = value;
- }
-
- HttpRequestArgsPtr HttpClient::createRequest(const std::string& url, const std::string& verb)
- {
- auto request = std::make_shared();
- request->url = url;
- request->verb = verb;
- return request;
- }
-
- bool HttpClient::performRequest(HttpRequestArgsPtr args,
- const OnResponseCallback& onResponseCallback)
- {
- assert(_async && "HttpClient needs its async parameter set to true "
- "in order to call performRequest");
- if (!_async) return false;
-
- // Enqueue the task
- {
- // acquire lock
- std::unique_lock lock(_queueMutex);
-
- // add the task
- _queue.push(std::make_pair(args, onResponseCallback));
- } // release lock
-
- // wake up one thread
- _condition.notify_one();
-
- return true;
- }
-
- void HttpClient::run()
- {
- while (true)
- {
- HttpRequestArgsPtr args;
- OnResponseCallback onResponseCallback;
-
- {
- std::unique_lock lock(_queueMutex);
-
- while (!_stop && _queue.empty())
- {
- _condition.wait(lock);
- }
-
- if (_stop) return;
-
- auto p = _queue.front();
- _queue.pop();
-
- args = p.first;
- onResponseCallback = p.second;
- }
-
- if (_stop) return;
-
- HttpResponsePtr response = request(args->url, args->verb, args->body, args);
- onResponseCallback(response);
-
- if (_stop) return;
- }
- }
-
- HttpResponsePtr HttpClient::request(const std::string& url,
- const std::string& verb,
- const std::string& body,
- HttpRequestArgsPtr args,
- int redirects)
- {
- // We only have one socket connection, so we cannot
- // make multiple requests concurrently.
- std::lock_guard lock(_mutex);
-
- uint64_t uploadSize = 0;
- uint64_t downloadSize = 0;
- int code = 0;
- WebSocketHttpHeaders headers;
- std::string payload;
- std::string description;
-
- std::string protocol, host, path, query;
- int port;
-
- if (!UrlParser::parse(url, protocol, host, path, query, port))
- {
- std::stringstream ss;
- ss << "Cannot parse url: " << url;
- return std::make_shared(code,
- description,
- HttpErrorCode::UrlMalformed,
- headers,
- payload,
- ss.str(),
- uploadSize,
- downloadSize);
- }
-
- bool tls = protocol == "https";
- std::string errorMsg;
- _socket = createSocket(tls, -1, errorMsg, _tlsOptions);
-
- if (!_socket)
- {
- return std::make_shared(code,
- description,
- HttpErrorCode::CannotCreateSocket,
- headers,
- payload,
- errorMsg,
- uploadSize,
- downloadSize);
- }
-
- // Build request string
- std::stringstream ss;
- ss << verb << " " << path << " HTTP/1.1\r\n";
- ss << "Host: " << host << "\r\n";
-
-#ifdef IXWEBSOCKET_USE_ZLIB
- if (args->compress && !args->onChunkCallback)
- {
- ss << "Accept-Encoding: gzip"
- << "\r\n";
- }
-#endif
-
- // Append extra headers
- for (auto&& it : args->extraHeaders)
- {
- ss << it.first << ": " << it.second << "\r\n";
- }
-
- // Set a default Accept header if none is present
- if (args->extraHeaders.find("Accept") == args->extraHeaders.end())
- {
- ss << "Accept: */*"
- << "\r\n";
- }
-
- // Set a default User agent if none is present
- if (args->extraHeaders.find("User-Agent") == args->extraHeaders.end())
- {
- ss << "User-Agent: " << userAgent() << "\r\n";
- }
-
- if (verb == kPost || verb == kPut || verb == kPatch || _forceBody)
- {
- // Set request compression header
-#ifdef IXWEBSOCKET_USE_ZLIB
- if (args->compressRequest)
- {
- ss << "Content-Encoding: gzip"
- << "\r\n";
- }
-#endif
-
- ss << "Content-Length: " << body.size() << "\r\n";
-
- // Set default Content-Type if unspecified
- if (args->extraHeaders.find("Content-Type") == args->extraHeaders.end())
- {
- if (args->multipartBoundary.empty())
- {
- ss << "Content-Type: application/x-www-form-urlencoded"
- << "\r\n";
- }
- else
- {
- ss << "Content-Type: multipart/form-data; boundary=" << args->multipartBoundary
- << "\r\n";
- }
- }
- ss << "\r\n";
- ss << body;
- }
- else
- {
- ss << "\r\n";
- }
-
- std::string req(ss.str());
- std::string errMsg;
-
- // Make a cancellation object dealing with connection timeout
- auto cancelled = makeCancellationRequestWithTimeout(args->connectTimeout, args->cancel);
-
- auto isCancellationRequested = [&]() {
- return cancelled() || _stop;
- };
-
- bool success = _socket->connect(host, port, errMsg, isCancellationRequested);
- if (!success)
- {
- auto errorCode = args->cancel ? HttpErrorCode::Cancelled : HttpErrorCode::CannotConnect;
- std::stringstream ss;
- ss << "Cannot connect to url: " << url << " / error : " << errMsg;
- return std::make_shared(code,
- description,
- errorCode,
- headers,
- payload,
- ss.str(),
- uploadSize,
- downloadSize);
- }
-
- // Make a new cancellation object dealing with transfer timeout
- cancelled = makeCancellationRequestWithTimeout(args->transferTimeout, args->cancel);
-
- if (args->verbose)
- {
- std::stringstream ss;
- ss << "Sending " << verb << " request "
- << "to " << host << ":" << port << std::endl
- << "request size: " << req.size() << " bytes" << std::endl
- << "=============" << std::endl
- << req << "=============" << std::endl
- << std::endl;
-
- log(ss.str(), args);
- }
-
- if (!_socket->writeBytes(req, isCancellationRequested))
- {
- auto errorCode = args->cancel ? HttpErrorCode::Cancelled : HttpErrorCode::SendError;
- std::string errorMsg("Cannot send request");
- return std::make_shared(code,
- description,
- errorCode,
- headers,
- payload,
- errorMsg,
- uploadSize,
- downloadSize);
- }
-
- uploadSize = req.size();
-
- auto lineResult = _socket->readLine(isCancellationRequested);
- auto lineValid = lineResult.first;
- auto line = lineResult.second;
-
- if (!lineValid)
- {
- auto errorCode = args->cancel ? HttpErrorCode::Cancelled : HttpErrorCode::CannotReadStatusLine;
- std::string errorMsg("Cannot retrieve status line");
- return std::make_shared(code,
- description,
- errorCode,
- headers,
- payload,
- errorMsg,
- uploadSize,
- downloadSize);
- }
-
- if (args->verbose)
- {
- std::stringstream ss;
- ss << "Status line " << line;
- log(ss.str(), args);
- }
-
- if (sscanf(line.c_str(), "HTTP/1.1 %d", &code) != 1)
- {
- std::string errorMsg("Cannot parse response code from status line");
- return std::make_shared(code,
- description,
- HttpErrorCode::MissingStatus,
- headers,
- payload,
- errorMsg,
- uploadSize,
- downloadSize);
- }
-
- auto result = parseHttpHeaders(_socket, isCancellationRequested);
- auto headersValid = result.first;
- headers = result.second;
-
- if (!headersValid)
- {
- auto errorCode = args->cancel ? HttpErrorCode::Cancelled : HttpErrorCode::HeaderParsingError;
- std::string errorMsg("Cannot parse http headers");
- return std::make_shared(code,
- description,
- errorCode,
- headers,
- payload,
- errorMsg,
- uploadSize,
- downloadSize);
- }
-
- // Redirect ?
- if ((code >= 301 && code <= 308) && args->followRedirects)
- {
- if (headers.find("Location") == headers.end())
- {
- std::string errorMsg("Missing location header for redirect");
- return std::make_shared(code,
- description,
- HttpErrorCode::MissingLocation,
- headers,
- payload,
- errorMsg,
- uploadSize,
- downloadSize);
- }
-
- if (redirects >= args->maxRedirects)
- {
- std::stringstream ss;
- ss << "Too many redirects: " << redirects;
- return std::make_shared(code,
- description,
- HttpErrorCode::TooManyRedirects,
- headers,
- payload,
- ss.str(),
- uploadSize,
- downloadSize);
- }
-
- // Recurse
- std::string location = headers["Location"];
- return request(location, verb, body, args, redirects + 1);
- }
-
- if (verb == "HEAD")
- {
- return std::make_shared(code,
- description,
- HttpErrorCode::Ok,
- headers,
- payload,
- std::string(),
- uploadSize,
- downloadSize);
- }
-
- // Parse response:
- if (headers.find("Content-Length") != headers.end())
- {
- ssize_t contentLength = -1;
- ss.str("");
- ss << headers["Content-Length"];
- ss >> contentLength;
-
- auto chunkResult = _socket->readBytes(contentLength,
- args->onProgressCallback,
- args->onChunkCallback,
- isCancellationRequested);
- if (!chunkResult.first)
- {
- auto errorCode = args->cancel ? HttpErrorCode::Cancelled : HttpErrorCode::ChunkReadError;
- errorMsg = "Cannot read chunk";
- return std::make_shared(code,
- description,
- errorCode,
- headers,
- payload,
- errorMsg,
- uploadSize,
- downloadSize);
- }
-
- if (!args->onChunkCallback)
- {
- payload.reserve(contentLength);
- payload += chunkResult.second;
- }
- }
- else if (headers.find("Transfer-Encoding") != headers.end() &&
- headers["Transfer-Encoding"] == "chunked")
- {
- std::stringstream ss;
-
- while (true)
- {
- auto errorCode = args->cancel ? HttpErrorCode::Cancelled : HttpErrorCode::ChunkReadError;
- lineResult = _socket->readLine(isCancellationRequested);
- line = lineResult.second;
-
- if (!lineResult.first)
- {
- return std::make_shared(code,
- description,
- errorCode,
- headers,
- payload,
- errorMsg,
- uploadSize,
- downloadSize);
- }
-
- uint64_t chunkSize;
- ss.str("");
- ss << std::hex << line;
- ss >> chunkSize;
-
- if (args->verbose)
- {
- std::stringstream oss;
- oss << "Reading " << chunkSize << " bytes" << std::endl;
- log(oss.str(), args);
- }
-
- // Read a chunk
- auto chunkResult = _socket->readBytes((size_t) chunkSize,
- args->onProgressCallback,
- args->onChunkCallback,
- isCancellationRequested);
- if (!chunkResult.first)
- {
- auto errorCode = args->cancel ? HttpErrorCode::Cancelled : HttpErrorCode::ChunkReadError;
- errorMsg = "Cannot read chunk";
- return std::make_shared(code,
- description,
- errorCode,
- headers,
- payload,
- errorMsg,
- uploadSize,
- downloadSize);
- }
-
- if (!args->onChunkCallback)
- {
- payload.reserve(payload.size() + (size_t) chunkSize);
- payload += chunkResult.second;
- }
-
- // Read the line that terminates the chunk (\r\n)
- lineResult = _socket->readLine(isCancellationRequested);
-
- if (!lineResult.first)
- {
- auto errorCode = args->cancel ? HttpErrorCode::Cancelled : HttpErrorCode::ChunkReadError;
- return std::make_shared(code,
- description,
- errorCode,
- headers,
- payload,
- errorMsg,
- uploadSize,
- downloadSize);
- }
-
- if (chunkSize == 0) break;
- }
- }
- else if (code == 204)
- {
- ; // 204 is NoContent response code
- }
- else
- {
- std::string errorMsg("Cannot read http body");
- return std::make_shared(code,
- description,
- HttpErrorCode::CannotReadBody,
- headers,
- payload,
- errorMsg,
- uploadSize,
- downloadSize);
- }
-
- downloadSize = payload.size();
-
- // If the content was compressed with gzip, decode it
- if (headers["Content-Encoding"] == "gzip")
- {
-#ifdef IXWEBSOCKET_USE_ZLIB
- std::string decompressedPayload;
- if (!gzipDecompress(payload, decompressedPayload))
- {
- std::string errorMsg("Error decompressing payload");
- return std::make_shared(code,
- description,
- HttpErrorCode::Gzip,
- headers,
- payload,
- errorMsg,
- uploadSize,
- downloadSize);
- }
- payload = decompressedPayload;
-#else
- std::string errorMsg("ixwebsocket was not compiled with gzip support on");
- return std::make_shared(code,
- description,
- HttpErrorCode::Gzip,
- headers,
- payload,
- errorMsg,
- uploadSize,
- downloadSize);
-#endif
- }
-
- return std::make_shared(code,
- description,
- HttpErrorCode::Ok,
- headers,
- payload,
- std::string(),
- uploadSize,
- downloadSize);
- }
-
- HttpResponsePtr HttpClient::get(const std::string& url, HttpRequestArgsPtr args)
- {
- return request(url, kGet, std::string(), args);
- }
-
- HttpResponsePtr HttpClient::head(const std::string& url, HttpRequestArgsPtr args)
- {
- return request(url, kHead, std::string(), args);
- }
-
- HttpResponsePtr HttpClient::Delete(const std::string& url, HttpRequestArgsPtr args)
- {
- return request(url, kDelete, std::string(), args);
- }
-
- HttpResponsePtr HttpClient::request(const std::string& url,
- const std::string& verb,
- const HttpParameters& httpParameters,
- const HttpFormDataParameters& httpFormDataParameters,
- HttpRequestArgsPtr args)
- {
- std::string body;
-
- if (httpFormDataParameters.empty())
- {
- body = serializeHttpParameters(httpParameters);
- }
- else
- {
- std::string multipartBoundary = generateMultipartBoundary();
- args->multipartBoundary = multipartBoundary;
- body = serializeHttpFormDataParameters(
- multipartBoundary, httpFormDataParameters, httpParameters);
- }
-
-#ifdef IXWEBSOCKET_USE_ZLIB
- if (args->compressRequest)
- {
- body = gzipCompress(body);
- }
-#endif
-
- return request(url, verb, body, args);
- }
-
- HttpResponsePtr HttpClient::post(const std::string& url,
- const HttpParameters& httpParameters,
- const HttpFormDataParameters& httpFormDataParameters,
- HttpRequestArgsPtr args)
- {
- return request(url, kPost, httpParameters, httpFormDataParameters, args);
- }
-
- HttpResponsePtr HttpClient::post(const std::string& url,
- const std::string& body,
- HttpRequestArgsPtr args)
- {
- return request(url, kPost, body, args);
- }
-
- HttpResponsePtr HttpClient::put(const std::string& url,
- const HttpParameters& httpParameters,
- const HttpFormDataParameters& httpFormDataParameters,
- HttpRequestArgsPtr args)
- {
- return request(url, kPut, httpParameters, httpFormDataParameters, args);
- }
-
- HttpResponsePtr HttpClient::put(const std::string& url,
- const std::string& body,
- const HttpRequestArgsPtr args)
- {
- return request(url, kPut, body, args);
- }
-
- HttpResponsePtr HttpClient::patch(const std::string& url,
- const HttpParameters& httpParameters,
- const HttpFormDataParameters& httpFormDataParameters,
- HttpRequestArgsPtr args)
- {
- return request(url, kPatch, httpParameters, httpFormDataParameters, args);
- }
-
- HttpResponsePtr HttpClient::patch(const std::string& url,
- const std::string& body,
- const HttpRequestArgsPtr args)
- {
- return request(url, kPatch, body, args);
- }
-
- std::string HttpClient::urlEncode(const std::string& value)
- {
- std::ostringstream escaped;
- escaped.fill('0');
- escaped << std::hex;
-
- for (std::string::const_iterator i = value.begin(), n = value.end(); i != n; ++i)
- {
- std::string::value_type c = (*i);
-
- // Keep alphanumeric and other accepted characters intact
- if (isalnum(c) || c == '-' || c == '_' || c == '.' || c == '~')
- {
- escaped << c;
- continue;
- }
-
- // Any other characters are percent-encoded
- escaped << std::uppercase;
- escaped << '%' << std::setw(2) << int((unsigned char) c);
- escaped << std::nouppercase;
- }
-
- return escaped.str();
- }
-
- std::string HttpClient::serializeHttpParameters(const HttpParameters& httpParameters)
- {
- std::stringstream ss;
- size_t count = httpParameters.size();
- size_t i = 0;
-
- for (auto&& it : httpParameters)
- {
- ss << urlEncode(it.first) << "=" << urlEncode(it.second);
-
- if (i++ < (count - 1))
- {
- ss << "&";
- }
- }
- return ss.str();
- }
-
- std::string HttpClient::serializeHttpFormDataParameters(
- const std::string& multipartBoundary,
- const HttpFormDataParameters& httpFormDataParameters,
- const HttpParameters& httpParameters)
- {
- //
- // --AaB03x
- // Content-Disposition: form-data; name="submit-name"
-
- // Larry
- // --AaB03x
- // Content-Disposition: form-data; name="foo.txt"; filename="file1.txt"
- // Content-Type: text/plain
-
- // ... contents of file1.txt ...
- // --AaB03x--
- //
- std::stringstream ss;
-
- for (auto&& it : httpFormDataParameters)
- {
- ss << "--" << multipartBoundary << "\r\n"
- << "Content-Disposition:"
- << " form-data; name=\"" << it.first << "\";"
- << " filename=\"" << it.first << "\""
- << "\r\n"
- << "Content-Type: application/octet-stream"
- << "\r\n"
- << "\r\n"
- << it.second << "\r\n";
- }
-
- for (auto&& it : httpParameters)
- {
- ss << "--" << multipartBoundary << "\r\n"
- << "Content-Disposition:"
- << " form-data; name=\"" << it.first << "\";"
- << "\r\n"
- << "\r\n"
- << it.second << "\r\n";
- }
-
- ss << "--" << multipartBoundary << "--\r\n";
-
- return ss.str();
- }
-
- void HttpClient::log(const std::string& msg, HttpRequestArgsPtr args)
- {
- if (args->logger)
- {
- args->logger(msg);
- }
- }
-
- std::string HttpClient::generateMultipartBoundary()
- {
- std::string str("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz");
-
- static std::random_device rd;
- static std::mt19937 generator(rd());
-
- std::shuffle(str.begin(), str.end(), generator);
-
- return str;
- }
-} // namespace ix
diff --git a/extern/IXWebSocket-11.3.2/ixwebsocket/IXHttpClient.h b/extern/IXWebSocket-11.3.2/ixwebsocket/IXHttpClient.h
deleted file mode 100644
index c4b0584501..0000000000
--- a/extern/IXWebSocket-11.3.2/ixwebsocket/IXHttpClient.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * IXHttpClient.h
- * Author: Benjamin Sergeant
- * Copyright (c) 2019 Machine Zone, Inc. All rights reserved.
- */
-
-#pragma once
-
-#include "IXHttp.h"
-#include "IXSocket.h"
-#include "IXSocketTLSOptions.h"
-#include "IXWebSocketHttpHeaders.h"
-#include
-#include
-#include
-#include
-#include