Crate naia_shared

source ·
Expand description

Naia Shared

Common functionality shared between naia-server & naia-client crates.

Modules

Structs

Keeps track of sent & received packets, and contains ack information that is copied into the standard header on each outgoing packet
Represents a connection to a remote host, and provides functionality to manage the connection and the communications to it
ChannelKind - should be one unique value for each type of Channel
ComponentKind - should be one unique value for each type of Component
A map to hold all component types
Contains Config properties which will be used by a Server or Client
Represents a specific moment in time
Simple implementation of a store that manages a recycling pool of u16 keys
Contains configuration required to initialize a LinkConditioner
MessageKind - should be one unique value for each type of Message
Handles incoming/outgoing messages, tracks the delivery status of Messages so that guaranteed Messages can be re-transmitted to the remote host
Contains Config properties which will be used by a Server or Client
Is responsible for sending regular ping messages between client/servers and to estimate rtt/jitter
A Property of an Component/Message, that contains data which must be tracked for updates
Container for cross-platform Random methods
The error message when failing to serialize/deserialize to/from the bit stream.
Contains Config properties which will be shared by Server and Client sockets
A Timer with a given duration after which it will enter into a “Ringing” state. The Timer can be reset at an given time, or manually set to start “Ringing” again.

Enums

Constants

Traits

Represents a manager that must be notified when packets have been dropped or delivered
Tracks which Properties have changed and need to be queued for syncing with the Client
A struct that implements Replicate is a Component, or otherwise, a container of Properties that can be scoped, tracked, and synced, with a remote host
A struct that implements Replicate is a Component, or otherwise, a container of Properties that can be scoped, tracked, and synced, with a remote host
A struct that implements Replicate is a Component, or otherwise, a container of Properties that can be scoped, tracked, and synced, with a remote host
A trait for objects that can be serialized to a bitstream.
A trait for objects that can be serialized to a bitstream.
A trait for objects that can be serialized to a bitstream.
A trait for objects that can be serialized to a bitstream.
Structures that implement the WorldMutType trait will be able to be loaded into the Server at which point the Server will use this interface to keep the WorldMutType in-sync with it’s own Entities/Components
Structures that implement the WorldMutType trait will be able to be loaded into the Server at which point the Server will use this interface to keep the WorldMutType in-sync with it’s own Entities/Components

Functions

Returns whether or not a wrapping number is greater than another sequence_greater_than(2,1) will return true sequence_greater_than(1,2) will return false sequence_greater_than(1,1) will return false
Returns whether or not a wrapping number is greater than another sequence_less_than(1,2) will return true sequence_less_than(2,1) will return false sequence_less_than(1,1) will return false
Retrieves the wrapping difference between 2 u16 values wrapping_diff(1,2) will return 1 wrapping_diff(2,1) will return -1 wrapping_diff(65535,0) will return 1 wrapping_diff(0,65535) will return -1

Type Definitions

Derive Macros

Derives the Channel trait for a given struct
Derives the Message trait for a given struct
Derives the Message trait for a given struct, for the Bevy adapter
Derives the Message trait for a given struct, for the Hecs adapter
Derives the Replicate trait for a given struct
Derives the Replicate trait for a given struct, for the Bevy adapter
Derives the Replicate trait for a given struct, for the Bevy adapter