Crate renet2_netcode

Crate renet2_netcode 

Source
Expand description

Integrates the netcode authentication and encryption protocol with renet2’s reliability layer.

Includes built-in data transports.

Structs§

BoxedSocket
Convenience wrapper for ServerSocket.
ConnectToken
A public connect token that the client receives to start connecting to the server. How the client receives ConnectToken is up to you, could be from a matchmaking system or from a call to a REST API as an example.
MemorySocketChannels
Holds the endpoints of bi-directional channels used by in-memory sockets.
MemorySocketClient
Implementation of ClientSocket for clients of an in-memory channel server socket.
MemorySocketServer
Implementation of ServerSocket for a server socket using in-memory channels.
NativeSocket
Implementation of ServerSocket for UdpSockets.
NetcodeClientTransport
NetcodeServerTransport
ServerCertHash
SHA-256 hash of a DER-encoded certificate.
ServerConfig
ServerSetupConfig
Config for setting up a NetcodeServerTransport.
ServerSocketConfig
Configuration details for a socket associated with a netcode server.
WebSocketServer
Implementation of ServerSocket for WebSocket servers.
WebSocketServerConfig
Configuration for setting up a WebSocketServer.
WebTransportServer
Implementation of ServerSocket for WebTransport servers.
WebTransportServerConfig
Configuration for setting up a WebTransportServer.

Enums§

ClientAuthentication
Configuration to establish a secure or unsecure connection with the server.
NetcodeDisconnectReason
The reason why a client is in error state
NetcodeError
Errors from the renetcode crate.
NetcodeTransportError
ServerAuthentication
Configuration to establish a secure or unsecure connection with the server.
TokenGenerationError
WebServerDestination
Represents a WebTransport server destination.
WebSocketAcceptor
Acceptor config for WebSocket connections.

Constants§

NETCODE_KEY_BYTES
The number of bytes in a private key;
NETCODE_USER_DATA_BYTES
The number of bytes that an user data can contain in the ConnectToken.

Traits§

ClientSocket
Unreliable data source for use in NetcodeClientTransport.
ServerSocket
Unreliable data source for use in NetcodeServerTransport.

Functions§

generate_random_bytes
Generate a buffer with random bytes using randomness from the operating system.
generate_self_signed_certificate
Generates a self-signed certificate for use in WebTransportConfig.
generate_self_signed_certificate_opinionated
Generates a self-signed certificate for use in WebTransportConfig.
get_certificate_and_key_from_files
Loads a certificate and private key from the file system.
get_server_cert_hash
Gets a ServerCertHash from a CertificateDer.
in_memory_client_addr
Converts a client index into a SocketAddr for in-memory client sockets.
in_memory_server_addr
Produces a SocketAddr for in-memory server sockets.
new_memory_sockets
Generates in-memory sockets.