pub struct TransportConfig {
pub compression_enabled: bool,
pub encryption_enabled: bool,
pub max_payload_size: usize,
pub compression_level: i32,
pub compression_threshold_bytes: usize,
}Expand description
Transport configuration
None of these settings is read by the built-in transports, clients or servers, so
every field is deprecated. The packet codec always enforces MAX_PAYLOAD_SIZE, the
built-in services always encrypt, and compression is applied only where you call
utils::compression yourself.
Fields§
§compression_enabled: boolnot applied by any transport; call utils::compression directly
Whether to enable compression
encryption_enabled: boolnot applied: the built-in services always encrypt
Whether to enable encryption
max_payload_size: usizenot applied: the packet codec always enforces MAX_PAYLOAD_SIZE
Maximum allowed payload size in bytes
compression_level: i32not applied by any transport; call utils::compression directly
Compression level (when compression is enabled)
compression_threshold_bytes: usizenot applied by any transport; call utils::compression directly
Minimum payload size (bytes) before compression is applied Payloads smaller than this threshold should bypass compression to reduce overhead