Expand description
§Lightyear Link
This crate defines the Link component and related abstractions for network communication.
A Link represents a connection to a remote peer and handles the buffering of incoming
and outgoing byte payloads. It is transport-agnostic, meaning the actual sending and
receiving of bytes over a physical (or virtual) network is handled by a separate IO layer
(e.g., UDP, WebTransport, Crossbeam channels).
It also includes features like:
- Link conditioning (simulating latency, jitter, packet loss) via
LinkConditioner. - Link state management (
Linked,Linking,Unlinked). - Basic link statistics (
LinkStats).
Modules§
Structs§
- Link
- Represents a link between two peers, allowing for sending and receiving data. This only stores the payloads to be sent and received, the actual bytes will be sent by an Io component
- Link
Conditioner - Link
Plugin - Bevy plugin that sets up the systems for managing
Linkcomponents. - Link
Receiver - Handles receiving and buffering incoming payloads for a
Link. - Link
Sender - Handles buffering outgoing payloads for a
Link. - Link
Start - Event triggered to initiate the process of establishing a
Link. - Link
Stats - Stores statistics about a
Link, such as bytes/packets sent and received, RTT, and jitter. - Linked
- Linking
- Unlink
- Event triggered to initiate the process of terminating a
Link. - Unlinked
Enums§
- Link
Receive Set - LinkSet
- System sets for
Link-related operations. - Link
State - Represents the current connection state of a
Link.
Type Aliases§
- Recv
Link Conditioner - Type alias for a
LinkConditionerspecifically for receivingRecvPayload. - Recv
Payload - Send
Payload