Crate naia_shared

Source
Expand description

§Naia Shared

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

Modules§

default_channels
handshake
link_condition_logic
Logic shared between client & server sockets related to simulating network conditions

Structs§

AckManager
Keeps track of sent & received packets, and contains ack information that is copied into the standard header on each outgoing packet
BandwidthMonitor
BaseConnection
Represents a connection to a remote host, and provides functionality to manage the connection and the communications to it
BigMap
BitReader
BitWriter
ChannelKind
ChannelKind - should be one unique value for each type of Channel
ChannelKinds
ComponentFieldUpdate
ComponentKind
ComponentKind - should be one unique value for each type of Component
ComponentKinds
A map to hold all component types
ComponentUpdate
CompressionConfig
ConnectionConfig
Contains Config properties which will be used by a Server or Client
Decoder
DiffMask
Encoder
EntityActionReceiver
EntityAuthAccessor
EntityConverter
EntityConverterMut
EntityDoesNotExistError
EntityEventMessage
EntityProperty
FakeEntityConverter
FileBitWriter
GameDuration
GameInstant
GlobalDiffHandler
GlobalEntity
GlobalRequestId
GlobalResponseId
HostAuthHandler
HostEntity
HostEntityAuthStatus
HostWorldEvents
HostWorldManager
Manages Entities for a given Client connection and keeps them in sync on the Client
Instant
Represents a specific moment in time
KeyGenerator
Simple implementation of a store that manages a recycling pool of u16 keys
LinkConditionerConfig
Contains configuration required to initialize a LinkConditioner
LocalResponseId
LocalWorldManager
MessageContainer
MessageKind
MessageKind - should be one unique value for each type of Message
MessageKinds
MessageManager
Handles incoming/outgoing messages, tracks the delivery status of Messages so that guaranteed Messages can be re-transmitted to the remote host
MutReceiver
OutgoingPacket
OwnedBitReader
PingStore
Property
A Property of an Component/Message, that contains data which must be tracked for updates
PropertyMutator
Protocol
Random
Container for cross-platform Random methods
ReliableSender
ReliableSettings
RemoteEntity
RemoteWorldManager
ReplicaDynMut
ReplicaDynMutWrapper
ReplicaDynRef
ReplicaDynRefWrapper
ReplicaMutWrapper
ReplicaRefWrapper
RequestOrResponse
ResponseReceiveKey
ResponseSendKey
SerdeErr
The error message when failing to serialize/deserialize to/from the bit stream.
SharedGlobalWorldManager
SocketConfig
Contains Config properties which will be shared by Server and Client sockets
StandardHeader
SystemChannel
TickBufferSettings
TimeQueue
A queue for items marked by time, will only ever pop items from the queue if the time passes
Timer
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.
Timestamp

Enums§

ChannelDirection
ChannelMode
CompressionMode
EntityAction
EntityActionEvent
EntityActionType
EntityAuthStatus
EntityEvent
EntityEventMessageAction
EntityResponseEvent
HostType
LocalRequestOrResponseId
OwnedLocalEntity
PacketType

Constants§

GAME_TIME_LIMIT
MTU_SIZE_BITS
MTU_SIZE_BYTES
The maximum of bytes that can be used for the payload of a given packet. (See #38 of http://ithare.com/64-network-dos-and-donts-for-game-engines-part-v-udp/)

Traits§

BigMapKey
BitWrite
Channel
ChannelReceiver
ChannelSender
ConstBitLength
EntityAndGlobalEntityConverter
EntityAndLocalEntityConverter
GlobalWorldManagerType
LocalEntityAndGlobalEntityConverter
LocalEntityAndGlobalEntityConverterMut
Message
MessageBevy
MessageBuilder
MessageChannelSender
MessageHecs
MutChannelType
Named
PacketNotifiable
Represents a manager that must be notified when packets have been dropped or delivered
PropertyMutate
Tracks which Properties have changed and need to be queued for syncing with the Client
ProtocolPlugin
ReplicaDynMutTrait
ReplicaDynRefTrait
ReplicaMutTrait
ReplicaRefTrait
Replicate
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
ReplicateBevy
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
ReplicateBuilder
ReplicateHecs
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
ReplicatedComponent
Request
Response
Serde
A trait for objects that can be serialized to a bitstream.
SerdeBevyClient
A trait for objects that can be serialized to a bitstream.
SerdeBevyServer
A trait for objects that can be serialized to a bitstream.
SerdeBevyShared
A trait for objects that can be serialized to a bitstream.
SerdeHecs
A trait for objects that can be serialized to a bitstream.
SerdeIntegerConversion
SerdeInternal
A trait for objects that can be serialized to a bitstream.
WorldMutType
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
WorldRefType
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§

generate_identity_token
sequence_greater_than
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
sequence_less_than
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
wrapping_diff
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 Aliases§

IdentityToken
MessageIndex
OrderedReliableReceiver
PacketIndex
PingIndex
ShortMessageIndex
SignedInteger
SignedVariableInteger
Tick
UnorderedReliableReceiver
UnsignedInteger
UnsignedVariableInteger

Derive Macros§

Channel
Derives the Channel trait for a given struct
Message
Derives the Message trait for a given struct
MessageBevy
Derives the Message trait for a given struct, for the Bevy adapter
MessageHecs
Derives the Message trait for a given struct, for the Hecs adapter
Replicate
Derives the Replicate trait for a given struct
ReplicateBevy
Derives the Replicate trait for a given struct, for the Bevy adapter
ReplicateHecs
Derives the Replicate trait for a given struct, for the Bevy adapter
Serde
SerdeBevyClient
SerdeBevyServer
SerdeBevyShared
SerdeHecs
SerdeInternal