Network Craftsmanship
The always-active branch, written alongside whichever other branch is currently in progress, not after the atlas is done — the same convention as Atlas I and II's craftsmanship branches. Here the discipline is protocol testing specifically: mock sockets so protocol logic can be unit-tested without a real network, fuzzing malformed WebSocket frames (lying payload lengths, corrupted masking, invalid UTF-8 in text frames), reading live traffic with Wireshark and tcpdump to verify what your implementation actually put on the wire, observability for a running server (active connection count, latency, drop rate, reconnection rate), and TDD applied to code that's inherently asynchronous and concurrent.
Planned notes
- Mock sockets: testing frame parsing and protocol logic without opening a real TCP connection
- Fuzzing the WebSocket frame parser: malformed lengths, corrupted masking keys, invalid UTF-8 in text-frame payloads
- Fuzzing the custom binary protocol from
custom-binary-protocolthe same way, before comparing it against the WebSocket fuzzing results - Reading a Wireshark capture of your own handshake and frames, and reconciling it against what RFC 6455 says should be there
tcpdumpfilters for isolating WebSocket traffic on a busy interface- Connection observability: exposing active-connection count, per-connection latency, drop rate, and reconnection rate from a running server
- Reproducing a race condition in the connection registry reliably, instead of chasing a flaky test
- TSan in the build, applied to the concurrent connection registry from
connection-concurrency-at-scale - TDD for an event-loop-driven server: what "unit test" means when the code under test is a callback fired by
epoll_wait - A code-review checklist specific to hand-rolled network protocol code: bounds checks on every length field, masking applied unconditionally, no trust in client-declared sizes
Core sources
- Wireshark documentation — filters and dissectors for TCP and WebSocket traffic.
- libFuzzer / AFL++ documentation — continued from Atlas I and II, applied here to WebSocket and custom-protocol frames.
- Test-Driven Development for Embedded C (Grenning) — TDD discipline for systems code, carried over from Atlas I and II.
Connects to: WebSocket Protocol from Scratch · Connection Concurrency at Scale