Crate valence_network

Source
Expand description

§valence_network

The plugin responsible for accepting connections and spawning clients.

This covers everything in the “handshaking”, “status” and “login” stages of the protocol, before the main “play” stage begins. Support for proxies like Velocity and BungeeCord are implemented here.

Valence users can choose not to include valence_network in their project. This could be useful for testing or using Valence as an integrated server in a client.

Structs§

ErasedNetworkCallbacks
A type-erased wrapper around an NetworkCallbacks object.
HandshakeData
Basic information about a client, provided at the beginning of the connection
NetworkPlugin
NetworkSettings
Settings for NetworkPlugin. Note that mutations to these fields have no effect after the plugin is built.
NewClientInfo
Contains information about a new client joining the server.
PlayerSampleEntry
Represents an individual entry in the player sample.
ServerListLegacyPingResponse
Response data of the legacy server list ping.
SharedNetworkState

Enums§

BroadcastToLan
The result of the Broadcast To Lan callback.
ConnectionMode
Describes how new connections to the server are handled.
ServerListLegacyPing
The result of the Server List Legacy Ping callback.
ServerListLegacyPingPayload
The payload of the legacy server list ping.
ServerListPing
The result of the Server List Ping callback.

Traits§

NetworkCallbacks
This trait uses async_trait.

Type Aliases§

CleanupFn
A callback function called when the associated client is dropped. See NetworkCallbacks::login for more information.

Attribute Macros§

async_trait