Expand description
Integrates the netcode authentication and encryption protocol with renet2’s reliability layer.
Includes built-in data transports.
Structs§
- Boxed
Socket - Convenience wrapper for
ServerSocket. - Connect
Token - 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.
- Memory
Socket Channels - Holds the endpoints of bi-directional channels used by in-memory sockets.
- Memory
Socket Client - Implementation of
ClientSocketfor clients of an in-memory channel server socket. - Memory
Socket Server - Implementation of
ServerSocketfor a server socket using in-memory channels. - Native
Socket - Implementation of
ServerSocketforUdpSockets. - Netcode
Client Transport - Netcode
Server Transport - Server
Cert Hash - SHA-256 hash of a DER-encoded certificate.
- Server
Config - Server
Setup Config - Config for setting up a
NetcodeServerTransport. - Server
Socket Config - Configuration details for a socket associated with a netcode server.
- WebSocket
Server - Implementation of
ServerSocketfor WebSocket servers. - WebSocket
Server Config - Configuration for setting up a
WebSocketServer. - WebTransport
Server - Implementation of
ServerSocketfor WebTransport servers. - WebTransport
Server Config - Configuration for setting up a
WebTransportServer.
Enums§
- Client
Authentication - Configuration to establish a secure or unsecure connection with the server.
- Netcode
Disconnect Reason - The reason why a client is in error state
- Netcode
Error - Errors from the renetcode crate.
- Netcode
Transport Error - Server
Authentication - Configuration to establish a secure or unsecure connection with the server.
- Token
Generation Error - WebServer
Destination - Represents a WebTransport server destination.
- WebSocket
Acceptor - 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§
- Client
Socket - Unreliable data source for use in
NetcodeClientTransport. - Server
Socket - 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
ServerCertHashfrom aCertificateDer. - in_
memory_ client_ addr - Converts a client index into a
SocketAddrfor in-memory client sockets. - in_
memory_ server_ addr - Produces a
SocketAddrfor in-memory server sockets. - new_
memory_ sockets - Generates in-memory sockets.