ws: implement network.only_ipv6 and network.tcp_backlog

This commit is contained in:
Joakim Frostegård 2022-03-20 18:41:41 +01:00
parent 07cc575e39
commit 06a716f78a
4 changed files with 37 additions and 3 deletions

View file

@ -59,7 +59,9 @@ pub struct NetworkConfig {
/// Bind to this address
pub address: SocketAddr,
/// Only allow access over IPv6
pub ipv6_only: bool,
pub only_ipv6: bool,
/// Maximum number of pending TCP connections
pub tcp_backlog: i32,
/// Path to TLS certificate (DER-encoded X.509)
pub tls_certificate_path: PathBuf,
@ -74,7 +76,8 @@ impl Default for NetworkConfig {
fn default() -> Self {
Self {
address: SocketAddr::from(([0, 0, 0, 0], 3000)),
ipv6_only: false,
only_ipv6: false,
tcp_backlog: 1024,
tls_certificate_path: "".into(),
tls_private_key_path: "".into(),