Skip to content

Commit 75868a0

Browse files
committed
chore(readme): modified structure of docs
1 parent d2666b4 commit 75868a0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
- **Incremental TCP Chunk Parsing with Custom Reusable Logic** - Implement `_consume()` method to handle fragmented TCP data arriving unpredictably, enabling parsing of WebSocket frames that span multiple TCP segments or bundled together in one segment
88

9+
![Multiple WS Messages in Single TCP Chunk](docs/1-chunk-multiple-ws-messages.png)
10+
911
- **Binary Data Manipulation & Interpretation** - Working directly with bytes: bitwise operations for extracting FIN/opcode/mask bits, big-endian decoding, and XOR-based unmasking (`_getInfo()`, `_unmaskDataPayload()`)
1012

1113
- **Deep WebSocket Protocol Understanding via Binary Frame Construction** - Hand-craft WebSocket frames in binary format exactly as transmitted over the wire, understanding why each bit and byte is positioned as it is (`send()` method, frame header assembly)
@@ -30,8 +32,6 @@
3032

3133
- **Multiple WebSocket Messages in Single TCP Chunk** - Design buffer management that preserves unconsumed data after processing complete message, enabling parser to immediately start next message without loss (`_reset()` intentionally excludes `_buffersArray` reset)
3234

33-
![Multiple WS Messages in Single TCP Chunk](docs/1-chunk-multiple-ws-messages.png)
34-
3535
- **Payload Size Security Limits** - Implement maximum payload enforcement to prevent memory exhaustion and DoS attacks, tracking cumulative size across fragmented messages and rejecting oversized payloads with proper close code (`_maxPayload`, `_processLength()`)
3636

3737
- **Connection Lifecycle via Closures** - Leverage JavaScript closures on socket event listeners to automatically maintain WebSocket instance lifetime, preventing premature garbage collection while connection is active (`_setupSocketListeners()` creates closures capturing `this`)

0 commit comments

Comments
 (0)