Low-latency UDP transport for EVOID — replaces WebSocket with ENet-level performance
Project description
evoid-transport
Low-latency UDP transport — Intent Handler system
Quick Start • Intent Handler • Channels • API
Quick Start
uv add evoid-transport
Method 1: Intent Handler (Recommended)
from evoid_transport import register_handlers
# Register UDP transport as Intent handlers
register_handlers(host="0.0.0.0", port=9000)
Method 2: Direct API
from evoid_transport import EvoidUDPPort
transport = EvoidUDPPort(host="0.0.0.0", port=9000)
await transport.start(game_id="my_game")
Intent Handler
evoid-transport registers UDP packet handling as Intent handlers.
Performance
WebSocket (TCP): ~2-5ms overhead
evoid-transport: ~0.5-1ms overhead
ENet: ~0.3-0.5ms overhead
Channels
| Channel | Use Case | Reliability | Ordering |
|---|---|---|---|
| 0 | Card plays, game actions | Reliable | Ordered |
| 1 | Position, animations | Unreliable | Unordered |
| 2 | Chat messages | Reliable | Unordered |
Configuration
TOML
[engines]
transport = "transport"
[engines.options.transport]
host = "0.0.0.0"
port = 9000
API
register_handlers(host, port)
Register UDP transport as Intent handlers.
EvoidUDPPort Methods
| Method | Signature | Description |
|---|---|---|
start |
async start(game_id) |
Start UDP server |
stop |
async stop() |
Stop UDP server |
broadcast_state_sync |
async broadcast_state_sync(state, tick) |
Broadcast game state |
send_intent_to_client |
async send_intent_to_client(addr, name, data) |
Send to specific client |
DI Integration
All plugins register with evoid-di for automatic service discovery and fault tolerance.
from evoid_di import di
# Resolve with fallback
storage = di.resolve_with_fallback("storage.postgresql")
# Tries: postgresql → sqlite → redis → cluster peers → None
Dependencies
evoid>=0.4.0- Optional:
evoid-godot>=1.0.0(for Godot integration)
Links
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file evoid_transport-0.1.2-py3-none-any.whl.
File metadata
- Download URL: evoid_transport-0.1.2-py3-none-any.whl
- Upload date:
- Size: 503.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
451e4226294eaa642ddf08a9b0e4f2112c0df771d9efe3b4ed290fcf22fde144
|
|
| MD5 |
147a1e4c4c086835682b1cf1d523ff93
|
|
| BLAKE2b-256 |
7dfc5aed6eec47365b064e04e4f555c8bebb7484324f9668a51c28623a93145f
|