Repository navigation
Network Protocol
Tom Colas edited this page Jan 18, 2026
·
2 revisions
This document specifies the R-Type UDP Reliable Protocol (RURP), a lightweight reliability layer built on top of UDP.
RURP provides TCP-like guarantees (delivery, ordering is optional) while retaining UDP performance characteristics.
- BASIC: Unreliable UDP transmission
- SAFE: Reliable UDP transmission
- ACK: Acknowledgment packet
- SAFE UID: Unique identifier for reliable packets
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ID (size_t) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Protocol | SAFE UID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Size | Type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Payload ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Value | Name |
|---|---|
| 0 | BASIC |
| 1+ | SAFE (Client-specific ID) |
- Sender assigns a unique SAFE UID
- Packet is sent
- Receiver replies with ACK (
type = 0) - Sender removes packet from retransmission queue
- Timeout-based retransmission
- Default timeout: 100ms
- Infinite retries until ACK or disconnect
ACK packets:
- Use same protocol ID
type = 0- No payload
- Carry SAFE UID
Clients are identified by:
- IP address
- UDP port
No persistent session state is required.
This protocol provides no encryption or authentication. It is intended for trusted environments (LAN / game servers).
- Game menus
- Lobby systems
- Reliable state synchronization
- ECS event replication