Skip to content

Latest commit

 

History

History
51 lines (41 loc) · 1.34 KB

README.md

File metadata and controls

51 lines (41 loc) · 1.34 KB

Implementing WebSocket to learn

Sometimes I just want to learn a new language, and no, that has nothing to do with ThePrimeagen (2022, 2023, 2024).

Languages

2024 (current): Zig

cd zig/
zig build run

Then open chat.html for a simple chat application.

2023 - Rust

cd rust/
cargo run

2022 - C++

cd cpp/
 ./build.sh run

Getting started

  1. Select lang and start server (see above)
  2. Create test connection:
cat ./corpus/handshake - | nc localhost 3000

tests

The server implementation can be tested with the Autobahn|Testsuite as follows:

(rust) $ RUST_LOG=debug cargo run --bin wsserver_autobahn

$ docker run -it --rm --net=host \
  -v "${PWD}/tests:/config" \
  -v "${PWD}/tests/reports:/reports" \
  --name fuzzingclient \
  crossbario/autobahn-testsuite \
  wstest -m fuzzingclient --spec /config/fuzzingclient.json