ws-tool
An easy to use websocket client/server toolkit, supporting blocking/async IO.
feature matrix
IO type | proxy | tls | deflate | use as client | use as server |
---|---|---|---|---|---|
blocking | 🚧wip | ✅ | 🚧wip | ✅ | ✅ |
async | ✅ | ✅ | 🚧wip | ✅ | ✅ |
It's tested by autobaha test suit. see examples/autobahn-client
pretty good performance
Roughly compare with EchoSever example, both async and blocking version of ws-tool echo serve win in multi client(more then 10) with 1m payload size.
My test machine is i9-12900k and 32GB, 3200MHz ddr4, use uWebSocket provided client example as perf client
uWebSocket
async ws-tool
blocking ws-tool
But when testing with single client, uWebSocket wins
async ws-tool
But I haven't done much optimization yet, if I have time, I should do some more optimizations, hopefully it will improve
usage
Every example can be run with
command.
See examples/server for building a websocket echo server with self signed certs.
examples/echo demonstrate how to connect to a wss server.
examples/binance show how to connect via proxy
run autobaha testsuit
start test server
run test on other terminal
report files should be under test_reports
dir.
autobahn test report
TODO
- add proxy auth config
- support custom https proxy cert
- split client into writer & reader(working)