Add module READMEs, .gitignore, and remove Bin/ from tracking

Add README.md for each library module documenting API, platform
backends, and usage. Add .gitignore for build artifacts. Remove
pre-built binaries from version control.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-03 00:27:55 -05:00
parent eca1e8c458
commit 71230f918f
16 changed files with 469 additions and 0 deletions

42
ZNet/README.md Normal file
View File

@@ -0,0 +1,42 @@
# ZNet
Event-driven UDP networking library for multiplayer games, built on top of
libsst-net and enet.
## Architecture
- `ZNetServer` -- listens for connections, manages multiple peers
- `ZNetClient` -- connects to a single server
- `ZNetHost` -- shared base class for both
- `ZNetPeer` -- represents a remote connection
## Packet delivery
Packets are created with `ZNetHost::CreatePacket()` and sent with either
reliable or transient (fire-and-forget) delivery:
- `ZNET_RELIABLE` -- guaranteed delivery with sequencing and ACK
- `ZNET_TRANSIENT` -- unreliable, lowest latency
Packets larger than MTU are automatically fragmented and reassembled.
## Events
Poll with `HasEvent()` / `GetNextEvent()`:
| Event | Meaning |
|---|---|
| `ZNETEVENT_CONNECT` | Peer connected |
| `ZNETEVENT_DISCONNECT` | Peer disconnected gracefully |
| `ZNETEVENT_TIMEOUT` | Peer timed out |
| `ZNETEVENT_DATA` | Data packet received |
## Features
- Bandwidth throttling (token bucket) via `ZNetBandwidthMeter`
- Configurable MTU (512 -- 1500 bytes, with IPv4/IPv6 safe defaults)
- Packet loss simulation for testing (`SetDropChance`)
- Connection validation callback on server (`ZNetConnectCallback`)
- Up to 4 listen sockets per server
- Reference-counted packets
- `ZNetUtil::ReaderForPacket()` / `WriterForPacket()` for easy serialization