Expand description
Kernels for clients Client-Side Network Components
This module provides pre-built client-side networking components for the Citadel Protocol. It includes implementations for various connection patterns including single server connections, peer-to-peer networking, and broadcast capabilities.
§Features
- Connection builders with flexible configuration
- Multiple authentication methods (Transient, Credentials)
- UDP support for NAT traversal
- Session security customization
- Pre-shared key authentication
- Connection lifecycle management
§Example
use citadel_sdk::prelude::*;
use std::net::SocketAddr;
use std::str::FromStr;
// Create transient connection settings
let settings = DefaultServerConnectionSettingsBuilder::transient("127.0.0.1:25021")
.with_udp_mode(UdpMode::Enabled)
.build()?;
§Important Notes
- Connection settings must be built before use
- UDP mode affects NAT traversal capabilities
- Pre-shared keys must match server configuration
- Transient connections do not persist data
§Related Components
broadcast
: Group communication supportpeer_connection
: Peer-to-peer networkingsingle_connection
: Single server connections
Modules§
- A kernel that assists in creating and/or connecting to a group Group Broadcasting and Management
- A kernel that assists in allowing multiple possible peer-to-peer connections Peer-to-Peer Connection Management
- A kernel that only makes a single client-to-server connection Single Client-Server Connection Kernel
Structs§
- Used to instantiate a client to server connection
Enums§
- The settings for a client-to-server connection