Crate lightyear_link

Crate lightyear_link 

Source
Expand description

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§

prelude
Commonly used items from the lightyear_link crate.
server

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
LinkConditioner
LinkPlugin
Bevy plugin that sets up the systems for managing Link components.
LinkReceiver
Handles receiving and buffering incoming payloads for a Link.
LinkSender
Handles buffering outgoing payloads for a Link.
LinkStart
Event triggered to initiate the process of establishing a Link.
LinkStats
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§

LinkReceiveSystems
LinkState
Represents the current connection state of a Link.
LinkSystems
System sets for Link-related operations.

Type Aliases§

LinkReceiveSetDeprecated
LinkSetDeprecated
RecvLinkConditioner
Type alias for a LinkConditioner specifically for receiving RecvPayload.
RecvPayload
SendPayload