diff --git a/test/compatibility/C/uWebSockets/.github/workflows/cpp.yml b/test/compatibility/C/uWebSockets/.github/workflows/cpp.yml
deleted file mode 100644
index 2df433ae..00000000
--- a/test/compatibility/C/uWebSockets/.github/workflows/cpp.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-name: C++ CI
-
-on: [push]
-
-jobs:
- build_linux:
-
- runs-on: ubuntu-latest
-
- steps:
- - name: Clone source
- run: git clone --recursive https://github.com/uNetworking/uWebSockets.git
- - name: Build source
- run: make -C uWebSockets
-
-
- build_osx:
-
- runs-on: macos-latest
-
- steps:
- - name: Clone source
- run: git clone --recursive https://github.com/uNetworking/uWebSockets.git
- - name: Build source
- run: make -C uWebSockets
-
diff --git a/test/compatibility/C/uWebSockets/.gitmodules b/test/compatibility/C/uWebSockets/.gitmodules
deleted file mode 100644
index d6e93f47..00000000
--- a/test/compatibility/C/uWebSockets/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "uSockets"]
- path = uSockets
- url = https://github.com/uNetworking/uSockets.git
diff --git a/test/compatibility/C/uWebSockets/LICENSE b/test/compatibility/C/uWebSockets/LICENSE
deleted file mode 100644
index 261eeb9e..00000000
--- a/test/compatibility/C/uWebSockets/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/test/compatibility/C/uWebSockets/Makefile b/test/compatibility/C/uWebSockets/Makefile
deleted file mode 100644
index 3a7232e2..00000000
--- a/test/compatibility/C/uWebSockets/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-EXAMPLE_FILES := HelloWorld EchoServer BroadcastingEchoServer
-THREADED_EXAMPLE_FILES := HelloWorldThreaded EchoServerThreaded
-override CXXFLAGS += -lpthread -Wconversion -std=c++17 -Isrc -IuSockets/src
-override LDFLAGS += uSockets/*.o -lz
-
-# WITH_OPENSSL=1 enables OpenSSL 1.1+ support
-ifeq ($(WITH_OPENSSL),1)
- # With problems on macOS, make sure to pass needed LDFLAGS required to find these
- override LDFLAGS += -lssl -lcrypto
-else
- # WITH_WOLFSSL=1 enables WolfSSL 4.2.0 support (mutually exclusive with OpenSSL)
- ifeq ($(WITH_WOLFSSL),1)
- override LDFLAGS += -L/usr/local/lib -lwolfssl
- endif
-endif
-
-# WITH_LIBUV=1 builds with libuv as event-loop
-ifeq ($(WITH_LIBUV),1)
- override LDFLAGS += -luv
-endif
-
-# WITH_ASAN builds with sanitizers
-ifeq ($(WITH_ASAN),1)
- override CXXFLAGS += -fsanitize=address
- override LDFLAGS += -lasan
-endif
-
-.PHONY: examples
-examples:
- cd uSockets && make
- $(foreach FILE,$(EXAMPLE_FILES),$(CXX) -flto -O3 $(CXXFLAGS) examples/$(FILE).cpp -o $(FILE) $(LDFLAGS);)
- $(foreach FILE,$(THREADED_EXAMPLE_FILES),$(CXX) -pthread -flto -O3 $(CXXFLAGS) examples/$(FILE).cpp -o $(FILE) $(LDFLAGS);)
-
-all:
- make examples
- make -C fuzzing
- make -C benchmarks
-clean:
- rm -rf $(EXAMPLE_FILES) $(THREADED_EXAMPLE_FILES)
- rm -rf fuzzing/*.o benchmarks/*.o
diff --git a/test/compatibility/C/uWebSockets/README.md b/test/compatibility/C/uWebSockets/README.md
deleted file mode 100644
index e108a760..00000000
--- a/test/compatibility/C/uWebSockets/README.md
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-#### Express yourself briefly.
-```c++
-uWS::SSLApp({
-
- /* There are tons of SSL options */
- .cert_file_name = "cert.pem",
- .key_file_name = "key.pem"
-
-}).get("/hello", [](auto *res, auto *req) {
-
- /* You can efficiently stream huge files too */
- res->writeHeader("Content-Type", "text/html; charset=utf-8")->end("Hello HTTP!");
-
-}).ws("/*", {
-
- /* Just a few of the available handlers */
- .open = [](auto *ws, auto *req) {
- ws->subscribe("buzzword weekly");
- },
- .message = [](auto *ws, std::string_view message, uWS::OpCode opCode) {
- ws->send(message, opCode);
- }
-
-}).listen(9001, [](auto *token) {
-
- if (token) {
- std::cout << "Listening on port " << 9001 << std::endl;
- }
-
-}).run();
-```
-Don't miss the [user manual](https://github.com/uNetworking/uWebSockets/blob/master/misc/READMORE.md#user-manual), the [C++ examples](https://github.com/uNetworking/uWebSockets/tree/master/examples) or the [JavaScript examples](https://github.com/uNetworking/uWebSockets.js/tree/master/examples). JavaScript examples are very applicable to C++ developers, so go through them as well.
-
-#### Pay what you want.
-A free & open source ([permissive](LICENSE)) project since 2016. Kindly sponsored by [BitMEX](https://bitmex.com), [Bitfinex](https://bitfinex.com) & [Coinbase](https://www.coinbase.com/) in 2018 and/or 2019. Individual donations are always accepted via [PayPal](https://paypal.me/uwebsockets).
-
-
-
-*Code is provided as-is, do not expect or demand **free** consulting services, personal tutoring, advice or debugging.*
-
-#### Deploy like a boss.
-Commercial support is available via a per-hourly consulting plan or as otherwise negotiated. If you're stuck, worried about design or just in need of help don't hesitate throwing [me, the author](https://github.com/alexhultman) a mail and we'll figure out what's best for both parties. I want your business to have a proper understanding of the problem before rushing in to one of the many pitfalls.
-
-#### Excel across the board.
-All that glitters is not gold. Especially so in a market driven by flashy logos, hype and pointless badges.
-
-Http | WebSockets
---- | ---
- | 
-
-#### Keep it legal.
-Intellectual property, all rights reserved.
-
-*You are forbidden to use logos, product names, texts, names or otherwise perceived brand identity, of copyright holder, in any way that might state or imply that the copyright holder endorses your distribution or in any way that might state or imply that you created the original software. Modified distributions must carry, from the original distribution, significantly different names and must not be confused with the original distribution.*
diff --git a/test/compatibility/C/uWebSockets/benchmarks/Makefile b/test/compatibility/C/uWebSockets/benchmarks/Makefile
deleted file mode 100644
index 9458b267..00000000
--- a/test/compatibility/C/uWebSockets/benchmarks/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-default:
- clang -flto -O3 -DLIBUS_USE_OPENSSL -I../uSockets/src ../uSockets/src/*.c ../uSockets/src/eventing/*.c ../uSockets/src/crypto/*.c broadcast_test.c -o broadcast_test -lssl -lcrypto
- clang -flto -O3 -DLIBUS_USE_OPENSSL -I../uSockets/src ../uSockets/src/*.c ../uSockets/src/eventing/*.c ../uSockets/src/crypto/*.c load_test.c -o load_test -lssl -lcrypto
- clang -flto -O3 -DLIBUS_USE_OPENSSL -I../uSockets/src ../uSockets/src/*.c ../uSockets/src/eventing/*.c ../uSockets/src/crypto/*.c scale_test.c -o scale_test -lssl -lcrypto
diff --git a/test/compatibility/C/uWebSockets/benchmarks/README.md b/test/compatibility/C/uWebSockets/benchmarks/README.md
deleted file mode 100644
index f64312a2..00000000
--- a/test/compatibility/C/uWebSockets/benchmarks/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# Benchmark-driven development
-
-Just like testing code for correctness and stability, testing for performance is just as important if performance is a goal. You cannot really argue or reason about performance without having tests for it.
-
-* Do not trust anyone who claims performance of any kind unless they provide benchmarks. Do not listen to people who talk about performance without having actual scientific data to back their claims up.
-* Never accept absolute numbers without a direct comparison with an alternative solution. Many projects can give you a number, X, which can be "50 billion messages per second". How much is this? What kind of worth does this number have? Impossible to know without a comparison. Absolute numbers mean nothing, relative comparisons are what you should look for.
-* Make sure to benchmark the correct thing. This is an extremely common mistake, done by many of the most well-known developers out there. If you measure for CPU-time efficiency (which you do) then normalizing for spent CPU-time is the difference between a completely invalid, botched and bogus test and something that might be valid.
-
-Here are the current relative comparisons:
-
-Http | WebSockets
---- | ---
- | 
-
-Over the period of a few years I have never come across any web server which can score as high as µWebSockets do. This is not to say that µWebSockets is fastest, as "fastest" is a silly superlative nobody should *ever* use.
-
-Never trust anyone using superlatives to describe their work; they are more often wrong than right.
diff --git a/test/compatibility/C/uWebSockets/benchmarks/broadcast_test.c b/test/compatibility/C/uWebSockets/benchmarks/broadcast_test.c
deleted file mode 100644
index a2695297..00000000
--- a/test/compatibility/C/uWebSockets/benchmarks/broadcast_test.c
+++ /dev/null
@@ -1,196 +0,0 @@
-/* This benchmark establishes _connections_ number of WebSocket
- clients, then iteratively performs the following:
-
- 1. Send one message for every client.
- 2. Wait for the quadratic (_connections_^2) amount of responses from the server.
- 3. Once received all expected bytes, repeat by going to step 1.
-
- Every 4 seconds we print the current average "iterations per second".
- */
-
-#include
-int SSL;
-
-#include
-#include
-#include
-
-unsigned char web_socket_request[26] = {130, 128 | 20, 1, 2, 3, 4};
-
-char request[] = "GET / HTTP/1.1\r\n"
- "Upgrade: websocket\r\n"
- "Connection: Upgrade\r\n"
- "Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==\r\n"
- "Host: server.example.com\r\n"
- "Sec-WebSocket-Version: 13\r\n\r\n";
-char *host;
-int port;
-int connections;
-
-int satisfied_sockets;
-int iterations;
-
-struct http_socket {
- /* How far we have streamed our websocket request */
- int offset;
-
- /* How far we have streamed our upgrade request */
- int upgrade_offset;
-
- /* Are we upgraded? */
- int is_upgraded;
-
- /* Bytes received */
- int bytes_received;
-};
-
-/* We track upgraded websockets */
-void **web_sockets;
-int num_web_sockets;
-
-/* We don't need any of these */
-void noop(struct us_loop_t *loop) {
-
-}
-
-void start_iteration() {
- for (int i = 0; i < num_web_sockets; i++) {
- struct us_socket_t *s = (struct us_socket_t *) web_sockets[i];
- struct http_socket *http_socket = (struct http_socket *) us_socket_ext(SSL, s);
-
- http_socket->offset = us_socket_write(SSL, s, (char *) web_socket_request, sizeof(web_socket_request), 0);
- }
-}
-
-void next_connection(struct us_socket_t *s) {
- /* Add this connection to our array */
- web_sockets[num_web_sockets++] = s;
-
- /* We could wait with this until properly upgraded */
- if (--connections) {
- us_socket_context_connect(SSL, us_socket_context(SSL, s), host, port, 0, sizeof(struct http_socket));
- } else {
- printf("Running benchmark now...\n");
- start_iteration();
-
- us_socket_timeout(SSL, s, LIBUS_TIMEOUT_GRANULARITY);
- }
-}
-
-struct us_socket_t *on_http_socket_writable(struct us_socket_t *s) {
- struct http_socket *http_socket = (struct http_socket *) us_socket_ext(SSL, s);
-
- /* Are we still not upgraded yet? */
- if (http_socket->upgrade_offset < sizeof(request) - 1) {
- http_socket->upgrade_offset += us_socket_write(SSL, s, request + http_socket->upgrade_offset, sizeof(request) - 1 - http_socket->upgrade_offset, 0);
- } else {
- /* Stream whatever is remaining of the request */
- http_socket->offset += us_socket_write(SSL, s, (char *) web_socket_request + http_socket->offset, sizeof(web_socket_request) - http_socket->offset, 0);
- }
-
- return s;
-}
-
-struct us_socket_t *on_http_socket_close(struct us_socket_t *s) {
-
- printf("Client was disconnected, exiting!\n");
- exit(-1);
-
- return s;
-}
-
-struct us_socket_t *on_http_socket_end(struct us_socket_t *s) {
- return us_socket_close(SSL, s);
-}
-
-struct us_socket_t *on_http_socket_data(struct us_socket_t *s, char *data, int length) {
- /* Get socket extension and the socket's context's extension */
- struct http_socket *http_socket = (struct http_socket *) us_socket_ext(SSL, s);
-
- /* Are we already upgraded? */
- if (http_socket->is_upgraded) {
- http_socket->bytes_received += length;
-
- if (http_socket->bytes_received == (sizeof(web_socket_request) - 4) * num_web_sockets) {
- satisfied_sockets++;
- http_socket->bytes_received = 0;
-
- if (satisfied_sockets == num_web_sockets) {
- iterations++;
- satisfied_sockets = 0;
-
- start_iteration();
- }
- }
- } else {
- /* We assume the server is not sending anything immediately following upgrade and that we get rnrn in one chunk */
- if (length >= 4 && data[length - 1] == '\n' && data[length - 2] == '\r' && data[length - 3] == '\n' && data[length - 4] == '\r') {
- http_socket->is_upgraded = 1;
- next_connection(s);
- }
- }
-
- return s;
-}
-
-struct us_socket_t *on_http_socket_open(struct us_socket_t *s, int is_client, char *ip, int ip_length) {
- struct http_socket *http_socket = (struct http_socket *) us_socket_ext(SSL, s);
-
- /* Reset offsets */
- http_socket->offset = 0;
- http_socket->is_upgraded = 0;
- http_socket->bytes_received = 0;
-
- /* Send an upgrade request */
- http_socket->upgrade_offset = us_socket_write(SSL, s, request, sizeof(request) - 1, 0);
-
- return s;
-}
-
-struct us_socket_t *on_http_socket_timeout(struct us_socket_t *s) {
- /* Print current statistics */
- printf("Iterations/second (%d clients): %f\n", num_web_sockets, ((float)iterations) / LIBUS_TIMEOUT_GRANULARITY);
-
- iterations = 0;
- us_socket_timeout(SSL, s, LIBUS_TIMEOUT_GRANULARITY);
-
- return s;
-}
-
-int main(int argc, char **argv) {
-
- /* Parse host and port */
- if (argc != 5) {
- printf("Usage: connections host port ssl\n");
- return 0;
- }
-
- port = atoi(argv[3]);
- host = malloc(strlen(argv[2]) + 1);
- memcpy(host, argv[2], strlen(argv[2]) + 1);
- connections = atoi(argv[1]);
- SSL = atoi(argv[4]);
-
- /* Allocate room for every socket */
- web_sockets = (void **) malloc(sizeof(void *) * connections);
-
- /* Create the event loop */
- struct us_loop_t *loop = us_create_loop(0, noop, noop, noop, 0);
-
- /* Create a socket context for HTTP */
- struct us_socket_context_options_t options = {};
- struct us_socket_context_t *http_context = us_create_socket_context(SSL, loop, 0, options);
-
- /* Set up event handlers */
- us_socket_context_on_open(SSL, http_context, on_http_socket_open);
- us_socket_context_on_data(SSL, http_context, on_http_socket_data);
- us_socket_context_on_writable(SSL, http_context, on_http_socket_writable);
- us_socket_context_on_close(SSL, http_context, on_http_socket_close);
- us_socket_context_on_timeout(SSL, http_context, on_http_socket_timeout);
- us_socket_context_on_end(SSL, http_context, on_http_socket_end);
-
- /* Start making HTTP connections */
- us_socket_context_connect(SSL, http_context, host, port, 0, sizeof(struct http_socket));
-
- us_loop_run(loop);
-}
diff --git a/test/compatibility/C/uWebSockets/benchmarks/load_test.c b/test/compatibility/C/uWebSockets/benchmarks/load_test.c
deleted file mode 100644
index 8770a03e..00000000
--- a/test/compatibility/C/uWebSockets/benchmarks/load_test.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/* This is a simple yet efficient WebSocket server benchmark much like WRK */
-
-#include
-int SSL;
-
-#include
-#include
-#include
-
-// request eller upgradeRequest samt webSocketFrame
-
-unsigned char web_socket_request[26] = {130, 128 | 20, 1, 2, 3, 4};
-
-char request[] = "GET / HTTP/1.1\r\n"
- "Upgrade: websocket\r\n"
- "Connection: Upgrade\r\n"
- "Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==\r\n"
- "Host: server.example.com\r\n"
- "Sec-WebSocket-Version: 13\r\n\r\n";
-char *host;
-int port;
-int connections;
-
-int responses;
-
-struct http_socket {
- /* How far we have streamed our websocket request */
- int offset;
-
- /* How far we have streamed our upgrade request */
- int upgrade_offset;
-};
-
-/* We don't need any of these */
-void on_wakeup(struct us_loop_t *loop) {
-
-}
-
-void on_pre(struct us_loop_t *loop) {
-
-}
-
-/* This is not HTTP POST, it is merely an event emitted post loop iteration */
-void on_post(struct us_loop_t *loop) {
-
-}
-
-void next_connection(struct us_socket_t *s) {
- /* We could wait with this until properly upgraded */
- if (--connections) {
- us_socket_context_connect(SSL, us_socket_context(SSL, s), host, port, 0, sizeof(struct http_socket));
- } else {
- printf("Running benchmark now...\n");
-
- us_socket_timeout(SSL, s, LIBUS_TIMEOUT_GRANULARITY);
- }
-}
-
-struct us_socket_t *on_http_socket_writable(struct us_socket_t *s) {
- struct http_socket *http_socket = (struct http_socket *) us_socket_ext(SSL, s);
-
- /* Are we still not upgraded yet? */
- if (http_socket->upgrade_offset < sizeof(request) - 1) {
- http_socket->upgrade_offset += us_socket_write(SSL, s, request + http_socket->upgrade_offset, sizeof(request) - 1 - http_socket->upgrade_offset, 0);
-
- /* Now we should be */
- if (http_socket->upgrade_offset == sizeof(request) - 1) {
- next_connection(s);
- }
- } else {
- /* Stream whatever is remaining of the request */
- http_socket->offset += us_socket_write(SSL, s, (char *) web_socket_request + http_socket->offset, sizeof(web_socket_request) - http_socket->offset, 0);
- }
-
- return s;
-}
-
-struct us_socket_t *on_http_socket_close(struct us_socket_t *s) {
-
- printf("Closed!\n");
-
- return s;
-}
-
-struct us_socket_t *on_http_socket_end(struct us_socket_t *s) {
- return us_socket_close(SSL, s);
-}
-
-struct us_socket_t *on_http_socket_data(struct us_socket_t *s, char *data, int length) {
- /* Get socket extension and the socket's context's extension */
- struct http_socket *http_socket = (struct http_socket *) us_socket_ext(SSL, s);
- //struct http_context *http_context = (struct http_context *) us_socket_context_ext(SSL, us_socket_context(SSL, s));
-
- /* We treat all data events as a response */
- http_socket->offset = us_socket_write(SSL, s, (char *) web_socket_request, sizeof(web_socket_request), 0);
-
- /* */
- responses++;
-
- return s;
-}
-
-struct us_socket_t *on_http_socket_open(struct us_socket_t *s, int is_client, char *ip, int ip_length) {
- struct http_socket *http_socket = (struct http_socket *) us_socket_ext(SSL, s);
-
- /* Reset offsets */
- http_socket->offset = 0;
-
- /* Send an upgrade request */
- http_socket->upgrade_offset = us_socket_write(SSL, s, request, sizeof(request) - 1, 0);
- if (http_socket->upgrade_offset == sizeof(request) - 1) {
- next_connection(s);
- }
-
- return s;
-}
-
-struct us_socket_t *on_http_socket_timeout(struct us_socket_t *s) {
- /* Print current statistics */
- printf("Msg/sec: %f\n", ((float)responses) / LIBUS_TIMEOUT_GRANULARITY);
-
- responses = 0;
- us_socket_timeout(SSL, s, LIBUS_TIMEOUT_GRANULARITY);
-
- return s;
-}
-
-int main(int argc, char **argv) {
-
- /* Parse host and port */
- if (argc != 5) {
- printf("Usage: connections host port ssl\n");
- return 0;
- }
-
- port = atoi(argv[3]);
- host = malloc(strlen(argv[2]) + 1);
- memcpy(host, argv[2], strlen(argv[2]) + 1);
- connections = atoi(argv[1]);
- SSL = atoi(argv[4]);
-
- /* Create the event loop */
- struct us_loop_t *loop = us_create_loop(0, on_wakeup, on_pre, on_post, 0);
-
- /* Create a socket context for HTTP */
- struct us_socket_context_options_t options = {};
- struct us_socket_context_t *http_context = us_create_socket_context(SSL, loop, 0, options);
-
- /* Set up event handlers */
- us_socket_context_on_open(SSL, http_context, on_http_socket_open);
- us_socket_context_on_data(SSL, http_context, on_http_socket_data);
- us_socket_context_on_writable(SSL, http_context, on_http_socket_writable);
- us_socket_context_on_close(SSL, http_context, on_http_socket_close);
- us_socket_context_on_timeout(SSL, http_context, on_http_socket_timeout);
- us_socket_context_on_end(SSL, http_context, on_http_socket_end);
-
- /* Start making HTTP connections */
- us_socket_context_connect(SSL, http_context, host, port, 0, sizeof(struct http_socket));
-
- us_loop_run(loop);
-}
diff --git a/test/compatibility/C/uWebSockets/benchmarks/scale_test.c b/test/compatibility/C/uWebSockets/benchmarks/scale_test.c
deleted file mode 100644
index 43b29281..00000000
--- a/test/compatibility/C/uWebSockets/benchmarks/scale_test.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/* This is a scalability test for testing million(s) of pinging connections */
-
-#include
-int SSL;
-
-#include
-#include
-#include
-
-unsigned char web_socket_request[26] = {130, 128 | 20, 1, 2, 3, 4};
-
-char request[] = "GET / HTTP/1.1\r\n"
- "Upgrade: websocket\r\n"
- "Connection: Upgrade\r\n"
- "Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==\r\n"
- "Host: server.example.com\r\n"
- "Sec-WebSocket-Version: 13\r\n\r\n";
-char *host;
-int port;
-int connections;
-
-/* Send ping every 16 seconds */
-int WEBSOCKET_PING_INTERVAL = 16;
-
-/* We only establish 20k connections per address */
-int CONNECTIONS_PER_ADDRESS = 20000;
-
-/* How many connections a time */
-int BATCH_CONNECT = 1;
-
-/* Currently open and alive connections */
-int opened_connections;
-/* Dead connections */
-int closed_connections;
-
-struct http_socket {
- /* How far we have streamed our websocket request */
- int offset;
-
- /* How far we have streamed our upgrade request */
- int upgrade_offset;
-};
-
-/* We don't need any of these */
-void on_wakeup(struct us_loop_t *loop) {
-
-}
-
-void on_pre(struct us_loop_t *loop) {
-
-}
-
-/* This is not HTTP POST, it is merely an event emitted post loop iteration */
-void on_post(struct us_loop_t *loop) {
-
-}
-
-void next_connection(struct us_socket_t *s) {
- /* We could wait with this until properly upgraded */
- if (--connections/* > BATCH_CONNECT*/) {
- /* Swap address */
- int address = opened_connections / CONNECTIONS_PER_ADDRESS + 1;
- char buf[16];
- sprintf(buf, "127.0.0.%d", address);
-
- us_socket_context_connect(SSL, us_socket_context(SSL, s), buf, port, 0, sizeof(struct http_socket));
- }
-}
-
-struct us_socket_t *on_http_socket_writable(struct us_socket_t *s) {
- struct http_socket *http_socket = (struct http_socket *) us_socket_ext(SSL, s);
-
- /* Are we still not upgraded yet? */
- if (http_socket->upgrade_offset < sizeof(request) - 1) {
- http_socket->upgrade_offset += us_socket_write(SSL, s, request + http_socket->upgrade_offset, sizeof(request) - 1 - http_socket->upgrade_offset, 0);
-
- /* Now we should be */
- if (http_socket->upgrade_offset == sizeof(request) - 1) {
- next_connection(s);
-
- /* Make sure to send ping */
- us_socket_timeout(SSL, s, WEBSOCKET_PING_INTERVAL);
- }
- } else {
- /* Stream whatever is remaining of the request */
- http_socket->offset += us_socket_write(SSL, s, (char *) web_socket_request + http_socket->offset, sizeof(web_socket_request) - http_socket->offset, 0);
- if (http_socket->offset == sizeof(web_socket_request)) {
- /* Reset timeout if we managed to */
- us_socket_timeout(SSL, s, WEBSOCKET_PING_INTERVAL);
- }
- }
-
- return s;
-}
-
-struct us_socket_t *on_http_socket_close(struct us_socket_t *s) {
-
- closed_connections++;
- if (closed_connections % 1000 == 0) {
- printf("Alive: %d, dead: %d\n", opened_connections, closed_connections);
- }
-
- return s;
-}
-
-struct us_socket_t *on_http_socket_end(struct us_socket_t *s) {
- return us_socket_close(SSL, s);
-}
-
-// should never get a response!
-struct us_socket_t *on_http_socket_data(struct us_socket_t *s, char *data, int length) {
- return s;
-}
-
-struct us_socket_t *on_http_socket_open(struct us_socket_t *s, int is_client, char *ip, int ip_length) {
- struct http_socket *http_socket = (struct http_socket *) us_socket_ext(SSL, s);
-
- /* Display number of opened connections */
- opened_connections++;
- if (opened_connections % 1000 == 0) {
- printf("Alive: %d, dead: %d\n", opened_connections, closed_connections);
- }
-
- /* Send an upgrade request */
- http_socket->upgrade_offset = us_socket_write(SSL, s, request, sizeof(request) - 1, 0);
- if (http_socket->upgrade_offset == sizeof(request) - 1) {
- next_connection(s);
-
- /* Make sure to send ping */
- us_socket_timeout(SSL, s, WEBSOCKET_PING_INTERVAL);
- }
-
- return s;
-}
-
-// here we should send a message as ping (part of the test)
-struct us_socket_t *on_http_socket_timeout(struct us_socket_t *s) {
- struct http_socket *http_socket = (struct http_socket *) us_socket_ext(SSL, s);
-
- /* Send ping here */
- http_socket->offset = us_socket_write(SSL, s, (char *) web_socket_request, sizeof(web_socket_request), 0);
- if (http_socket->offset == sizeof(web_socket_request)) {
- /* Reset timeout if we managed to */
- us_socket_timeout(SSL, s, WEBSOCKET_PING_INTERVAL);
- }
-
- return s;
-}
-
-int main(int argc, char **argv) {
-
- /* Parse host and port */
- if (argc != 5) {
- printf("Usage: connections host port ssl\n");
- return 0;
- }
-
- port = atoi(argv[3]);
- host = malloc(strlen(argv[2]) + 1);
- memcpy(host, argv[2], strlen(argv[2]) + 1);
- connections = atoi(argv[1]);
- SSL = atoi(argv[4]);
-
- /* Create the event loop */
- struct us_loop_t *loop = us_create_loop(0, on_wakeup, on_pre, on_post, 0);
-
- /* Create a socket context for HTTP */
- struct us_socket_context_options_t options = {};
- struct us_socket_context_t *http_context = us_create_socket_context(SSL, loop, 0, options);
-
- /* Set up event handlers */
- us_socket_context_on_open(SSL, http_context, on_http_socket_open);
- us_socket_context_on_data(SSL, http_context, on_http_socket_data);
- us_socket_context_on_writable(SSL, http_context, on_http_socket_writable);
- us_socket_context_on_close(SSL, http_context, on_http_socket_close);
- us_socket_context_on_timeout(SSL, http_context, on_http_socket_timeout);
- us_socket_context_on_end(SSL, http_context, on_http_socket_end);
-
- /* Start making HTTP connections */
- for (int i = 0; i < BATCH_CONNECT; i++) {
- us_socket_context_connect(SSL, http_context, host, port, 0, sizeof(struct http_socket));
- }
-
- us_loop_run(loop);
-}
diff --git a/test/compatibility/C/uWebSockets/examples/BroadcastingEchoServer.cpp b/test/compatibility/C/uWebSockets/examples/BroadcastingEchoServer.cpp
deleted file mode 100644
index 3a7b3250..00000000
--- a/test/compatibility/C/uWebSockets/examples/BroadcastingEchoServer.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "App.h"
-
-struct us_listen_socket_t *listen_socket;
-
-int main() {
- /* ws->getUserData returns one of these */
- struct PerSocketData {
-
- };
-
- /* Very simple WebSocket broadcasting echo server */
- uWS::App().ws("/*", {
- /* Settings */
- .compression = uWS::SHARED_COMPRESSOR,
- .maxPayloadLength = 16 * 1024 * 1024,
- .idleTimeout = 10,
- .maxBackpressure = 1 * 1024 * 1204,
- /* Handlers */
- .open = [](auto *ws, auto *req) {
- /* Let's make every connection subscribe to the "broadcast" topic */
- ws->subscribe("broadcast");
- },
- .message = [](auto *ws, std::string_view message, uWS::OpCode opCode) {
- /* Exit gracefully if we get a closedown message (ASAN debug) */
- if (message == "closedown") {
- /* Bye bye */
- us_listen_socket_close(0, listen_socket);
- ws->close();
- }
-
- /* Simply broadcast every single message we get */
- ws->publish("broadcast", message, opCode);
- },
- .drain = [](auto *ws) {
- /* Check getBufferedAmount here */
- },
- .ping = [](auto *ws) {
-
- },
- .pong = [](auto *ws) {
-
- },
- .close = [](auto *ws, int code, std::string_view message) {
- /* We automatically unsubscribe from any topic here */
- }
- }).listen(9001, [](auto *token) {
- listen_socket = token;
- if (token) {
- std::cout << "Listening on port " << 9001 << std::endl;
- }
- }).run();
-}
diff --git a/test/compatibility/C/uWebSockets/examples/EchoServer.cpp b/test/compatibility/C/uWebSockets/examples/EchoServer.cpp
deleted file mode 100644
index b41bd9ab..00000000
--- a/test/compatibility/C/uWebSockets/examples/EchoServer.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/* We simply call the root header file "App.h", giving you uWS::App and uWS::SSLApp */
-#include "App.h"
-
-/* This is a simple WebSocket echo server example.
- * You may compile it with "WITH_OPENSSL=1 make" or with "make" */
-
-int main() {
- /* ws->getUserData returns one of these */
- struct PerSocketData {
- /* Fill with user data */
- };
-
- /* Keep in mind that uWS::SSLApp({options}) is the same as uWS::App() when compiled without SSL support.
- * You may swap to using uWS:App() if you don't need SSL */
- uWS::SSLApp({
- /* There are example certificates in uWebSockets.js repo */
- .key_file_name = "../misc/key.pem",
- .cert_file_name = "../misc/cert.pem",
- .passphrase = "1234"
- }).ws("/*", {
- /* Settings */
- .compression = uWS::SHARED_COMPRESSOR,
- .maxPayloadLength = 16 * 1024,
- .idleTimeout = 10,
- .maxBackpressure = 1 * 1024 * 1204,
- /* Handlers */
- .open = [](auto *ws, auto *req) {
- /* Open event here, you may access ws->getUserData() which points to a PerSocketData struct */
- },
- .message = [](auto *ws, std::string_view message, uWS::OpCode opCode) {
- ws->send(message, opCode);
- },
- .drain = [](auto *ws) {
- /* Check ws->getBufferedAmount() here */
- },
- .ping = [](auto *ws) {
- /* Not implemented yet */
- },
- .pong = [](auto *ws) {
- /* Not implemented yet */
- },
- .close = [](auto *ws, int code, std::string_view message) {
- /* You may access ws->getUserData() here */
- }
- }).listen(9001, [](auto *token) {
- if (token) {
- std::cout << "Listening on port " << 9001 << std::endl;
- }
- }).run();
-}
diff --git a/test/compatibility/C/uWebSockets/examples/EchoServerThreaded.cpp b/test/compatibility/C/uWebSockets/examples/EchoServerThreaded.cpp
deleted file mode 100644
index 2b596ef5..00000000
--- a/test/compatibility/C/uWebSockets/examples/EchoServerThreaded.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-#include "App.h"
-#include
-#include
-
-int main() {
- /* ws->getUserData returns one of these */
- struct PerSocketData {
-
- };
-
- /* Simple echo websocket server, using multiple threads */
- std::vector threads(std::thread::hardware_concurrency());
-
- std::transform(threads.begin(), threads.end(), threads.begin(), [](std::thread *t) {
- return new std::thread([]() {
-
- /* Very simple WebSocket echo server */
- uWS::App().ws("/*", {
- /* Settings */
- .compression = uWS::SHARED_COMPRESSOR,
- .maxPayloadLength = 16 * 1024,
- .idleTimeout = 10,
- .maxBackpressure = 1 * 1024 * 1204,
- /* Handlers */
- .open = [](auto *ws, auto *req) {
-
- },
- .message = [](auto *ws, std::string_view message, uWS::OpCode opCode) {
- ws->send(message, opCode);
- },
- .drain = [](auto *ws) {
- /* Check getBufferedAmount here */
- },
- .ping = [](auto *ws) {
-
- },
- .pong = [](auto *ws) {
-
- },
- .close = [](auto *ws, int code, std::string_view message) {
-
- }
- }).listen(9001, [](auto *token) {
- if (token) {
- std::cout << "Thread " << std::this_thread::get_id() << " listening on port " << 9001 << std::endl;
- } else {
- std::cout << "Thread " << std::this_thread::get_id() << " failed to listen on port 9001" << std::endl;
- }
- }).run();
-
- });
- });
-
- std::for_each(threads.begin(), threads.end(), [](std::thread *t) {
- t->join();
- });
-}
diff --git a/test/compatibility/C/uWebSockets/examples/HelloWorld.cpp b/test/compatibility/C/uWebSockets/examples/HelloWorld.cpp
deleted file mode 100644
index d18e8d8a..00000000
--- a/test/compatibility/C/uWebSockets/examples/HelloWorld.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "App.h"
-
-/* Note that uWS::SSLApp({options}) is the same as uWS::App() when compiled without SSL support */
-
-int main() {
- /* Overly simple hello world app */
- uWS::SSLApp({
- .key_file_name = "../misc/key.pem",
- .cert_file_name = "../misc/cert.pem",
- .passphrase = "1234"
- }).get("/*", [](auto *res, auto *req) {
- res->end("Hello world!");
- }).listen(3000, [](auto *token) {
- if (token) {
- std::cout << "Listening on port " << 3000 << std::endl;
- }
- }).run();
-
- std::cout << "Failed to listen on port 3000" << std::endl;
-}
diff --git a/test/compatibility/C/uWebSockets/examples/HelloWorldThreaded.cpp b/test/compatibility/C/uWebSockets/examples/HelloWorldThreaded.cpp
deleted file mode 100644
index a35e9b5b..00000000
--- a/test/compatibility/C/uWebSockets/examples/HelloWorldThreaded.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include "App.h"
-#include
-#include
-
-int main() {
- /* Overly simple hello world app, using multiple threads */
- std::vector threads(std::thread::hardware_concurrency());
-
- std::transform(threads.begin(), threads.end(), threads.begin(), [](std::thread *t) {
- return new std::thread([]() {
-
- uWS::App().get("/*", [](auto *res, auto *req) {
- res->end("Hello world!");
- }).listen(3000, [](auto *token) {
- if (token) {
- std::cout << "Thread " << std::this_thread::get_id() << " listening on port " << 3000 << std::endl;
- } else {
- std::cout << "Thread " << std::this_thread::get_id() << " failed to listen on port 3000" << std::endl;
- }
- }).run();
-
- });
- });
-
- std::for_each(threads.begin(), threads.end(), [](std::thread *t) {
- t->join();
- });
-}
diff --git a/test/compatibility/C/uWebSockets/examples/HttpServer.cpp b/test/compatibility/C/uWebSockets/examples/HttpServer.cpp
deleted file mode 100644
index 6c72bdff..00000000
--- a/test/compatibility/C/uWebSockets/examples/HttpServer.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-/* This is a simple HTTP(S) web server much like Python's SimpleHTTPServer */
-
-#include
-
-/* Helpers for this example */
-#include "helpers/AsyncFileReader.h"
-#include "helpers/AsyncFileStreamer.h"
-#include "helpers/Middleware.h"
-
-/* optparse */
-#define OPTPARSE_IMPLEMENTATION
-#include "helpers/optparse.h"
-
-int main(int argc, char **argv) {
-
- int option;
- struct optparse options;
- optparse_init(&options, argv);
-
- struct optparse_long longopts[] = {
- {"port", 'p', OPTPARSE_REQUIRED},
- {"help", 'h', OPTPARSE_NONE},
- {"passphrase", 'a', OPTPARSE_REQUIRED},
- {"key", 'k', OPTPARSE_REQUIRED},
- {"cert", 'c', OPTPARSE_REQUIRED},
- {"dh_params", 'd', OPTPARSE_REQUIRED},
- {0}
- };
-
- int port = 3000;
- struct us_socket_context_options_t ssl_options = {};
-
- while ((option = optparse_long(&options, longopts, nullptr)) != -1) {
- switch (option) {
- case 'p':
- port = atoi(options.optarg);
- break;
- case 'a':
- ssl_options.passphrase = options.optarg;
- break;
- case 'c':
- ssl_options.cert_file_name = options.optarg;
- break;
- case 'k':
- ssl_options.key_file_name = options.optarg;
- break;
- case 'd':
- ssl_options.dh_params_file_name = options.optarg;
- break;
- case 'h':
- case '?':
- fail:
- std::cout << "Usage: " << argv[0] << " [--help] [--port ] [--key ] [--cert ] [--passphrase ] [--dh_params ] " << std::endl;
- return 0;
- }
- }
-
- char *root = optparse_arg(&options);
- if (!root) {
- goto fail;
- }
-
- AsyncFileStreamer asyncFileStreamer(root);
-
- /* Either serve over HTTP or HTTPS */
- struct us_socket_context_options_t empty_ssl_options = {};
- if (memcmp(&ssl_options, &empty_ssl_options, sizeof(empty_ssl_options))) {
- /* HTTPS */
- uWS::SSLApp(ssl_options).get("/*", [&asyncFileStreamer](auto *res, auto *req) {
- serveFile(res, req);
- asyncFileStreamer.streamFile(res, req->getUrl());
- }).listen(port, [port, root](auto *token) {
- if (token) {
- std::cout << "Serving " << root << " over HTTPS a " << port << std::endl;
- }
- }).run();
- } else {
- /* HTTP */
- uWS::App().get("/*", [&asyncFileStreamer](auto *res, auto *req) {
- serveFile(res, req);
- asyncFileStreamer.streamFile(res, req->getUrl());
- }).listen(port, [port, root](auto *token) {
- if (token) {
- std::cout << "Serving " << root << " over HTTP a " << port << std::endl;
- }
- }).run();
- }
-
- std::cout << "Failed to listen to port " << port << std::endl;
-}
diff --git a/test/compatibility/C/uWebSockets/examples/helpers/AsyncFileReader.h b/test/compatibility/C/uWebSockets/examples/helpers/AsyncFileReader.h
deleted file mode 100644
index c086c1e9..00000000
--- a/test/compatibility/C/uWebSockets/examples/helpers/AsyncFileReader.h
+++ /dev/null
@@ -1,130 +0,0 @@
-#include