Skip to main content

Low-latency UDP transport for EVOID — replaces WebSocket with ENet-level performance

Project description

Rust PyPI Python License

evoid-transport

Low-latency UDP transport — Intent Handler system

Quick StartIntent HandlerChannelsAPI


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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

evoid_transport-0.1.2-py3-none-any.whl (503.1 kB view details)

Uploaded Python 3

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

Hashes for evoid_transport-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 451e4226294eaa642ddf08a9b0e4f2112c0df771d9efe3b4ed290fcf22fde144
MD5 147a1e4c4c086835682b1cf1d523ff93
BLAKE2b-256 7dfc5aed6eec47365b064e04e4f555c8bebb7484324f9668a51c28623a93145f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page