Skip to content

Commit 464867a

Browse files
authored
WebSocket and Dynamic Thread Pool support (#2368)
* WebSocket support * Validate selected subprotocol in WebSocket handshake * Fix problem with a Unit test * Dynamic Thread Pool support * Fix race condition in new Dynamic ThreadPool
1 parent d4180e9 commit 464867a

File tree

11 files changed

+2875
-62
lines changed

11 files changed

+2875
-62
lines changed

.github/workflows/test.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ jobs:
103103
- name: run fuzz test target
104104
if: matrix.tls_backend == 'openssl'
105105
run: cd test && make fuzz_test
106+
- name: build and run WebSocket heartbeat test
107+
if: matrix.tls_backend == 'openssl'
108+
run: cd test && make test_websocket_heartbeat && ./test_websocket_heartbeat
109+
- name: build and run ThreadPool test
110+
run: cd test && make test_thread_pool && ./test_thread_pool
106111

107112
macos:
108113
runs-on: macos-latest
@@ -132,6 +137,11 @@ jobs:
132137
- name: run fuzz test target
133138
if: matrix.tls_backend == 'openssl'
134139
run: cd test && make fuzz_test
140+
- name: build and run WebSocket heartbeat test
141+
if: matrix.tls_backend == 'openssl'
142+
run: cd test && make test_websocket_heartbeat && ./test_websocket_heartbeat
143+
- name: build and run ThreadPool test
144+
run: cd test && make test_thread_pool && ./test_thread_pool
135145

136146
windows:
137147
runs-on: windows-latest

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ example/server_and_client
2929
!example/server_and_client.*
3030
example/accept_header
3131
!example/accept_header.*
32+
example/wsecho
33+
!example/wsecho.*
3234
example/*.pem
3335
test/httplib.cc
3436
test/httplib.h
@@ -41,6 +43,8 @@ test/test_proxy_mbedtls
4143
test/test_split
4244
test/test_split_mbedtls
4345
test/test_split_no_tls
46+
test/test_websocket_heartbeat
47+
test/test_thread_pool
4448
test/test.xcodeproj/xcuser*
4549
test/test.xcodeproj/*/xcuser*
4650
test/*.o

0 commit comments

Comments
 (0)