Class NeonRelay

java.lang.Object
com.quietterminal.neon.core.AbstractLifecycle
com.quietterminal.neon.relay.NeonRelay
All Implemented Interfaces:
Lifecycle, AutoCloseable

public final class NeonRelay extends AbstractLifecycle implements AutoCloseable
UDP relay server for the Neon multiplayer protocol.

A NeonRelay routes packets between session hosts and clients. It manages session state, enforces per-source rate limits, and handles the connection and reconnection handshake on behalf of the host.

The relay is stateless with respect to game logic — it only understands the protocol lifecycle packets (CONNECT_REQUEST, CONNECT_ACCEPT, etc.) and routes everything else based on the destination ID in the packet header.

Typical deployment:

NeonRelay relay = new NeonRelay("0.0.0.0", NeonConfig.defaults());
Thread.ofVirtual().start(relay::startAndRun);