Expand description
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:
RecvPayloadandSendPayloadare opaque byte payloads.LinkReceiverbuffers payloads received from a transport until higher-level systems consume them.LinkSenderbuffers payloads produced by higher-level systems until a transport flushes them.LinkConditionercan delay or drop inbound payloads to simulate imperfect networks.Linking,Linked, andUnlinkedare mutually exclusive ECS marker components that keepLink::statesynchronized with the entity lifecycle.
Server-side fan-out relationships live in server.
Modules§
Structs§
- Link
- Transport-neutral byte stream between two peers.
- Link
Conditioner - Generic receive-side packet conditioner.
- Link
Plugin - Bevy plugin that installs link lifecycle and receive-buffer systems.
- Link
Receiver - Receive-side payload queue for a
Link. - Link
Sender - Send-side payload queue for a
Link. - Link
Start - Entity event requesting that a transport start establishing a
Link. - Link
Stats - Transport-observed statistics for a
Link. - Linked
- Marker component for an established link.
- Linking
- Marker component for a link whose transport connection is being established.
- Unlink
- Entity event requesting that a transport terminate a
Link. - Unlinked
- Marker component for a link that is not connected.
Enums§
- Link
Receive Systems - System sets that make up
LinkSystems::Receive. - Link
State - Current lifecycle state of a
Link. - Link
Systems - System sets for
Link-related operations.
Type Aliases§
- Link
Receive Set Deprecated - Deprecated alias for
LinkReceiveSystems. - LinkSet
Deprecated - Deprecated alias for
LinkSystems. - Recv
Link Conditioner - Packet conditioner used for inbound
RecvPayloadvalues. - Recv
Payload - Opaque byte payload received from a transport.
- Send
Payload - Opaque byte payload queued for a transport to send.