lightyear_link 0.28.0

IO primitives for the lightyear networking library
Documentation

Transport-agnostic link buffers and link lifecycle markers.

A [Link] is Lightyear's transport-neutral boundary between higher-level networking systems and concrete IO backends. Protocol, connection, replication, and message systems read from and write to [Link] buffers; transport crates such as lightyear_udp, lightyear_webtransport, lightyear_websocket, lightyear_steam, and lightyear_crossbeam are responsible for moving those [bytes::Bytes] payloads across an actual network or in-process channel.

The crate deliberately keeps the IO abstraction narrow:

  • [RecvPayload] and [SendPayload] are opaque byte payloads.
  • [LinkReceiver] buffers payloads received from a transport until higher-level systems consume them.
  • [LinkSender] buffers payloads produced by higher-level systems until a transport flushes them.
  • [LinkConditioner] can delay or drop inbound payloads to simulate imperfect networks.
  • [Linking], [Linked], and [Unlinked] are mutually exclusive ECS marker components that keep [Link::state] synchronized with the entity lifecycle.

Server-side fan-out relationships live in [server].