Files

16 lines
436 B
Markdown
Raw Permalink Normal View History

# Example 03: WebSocket Tunnel
Two clients exchange encrypted messages over a WebSocket connection using `ShadeWebSocket`. The wire format is binary protobuf-like encoding for compactness.
## Run
```bash
bun run main.ts
```
## What it shows
- Wrapping a raw WebSocket with auto-encryption via `ShadeWebSocket`
- Bidirectional encrypted messaging
- The client never has to manually call `encrypt()`/`decrypt()` — it's transparent