mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
ws: implement network.only_ipv6 and network.tcp_backlog
This commit is contained in:
parent
07cc575e39
commit
06a716f78a
4 changed files with 37 additions and 3 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue