move back SocketConfig to aquatic_http

This commit is contained in:
Joakim Frostegård 2020-07-02 17:06:34 +02:00
parent 82378e71f6
commit b86787ef20
5 changed files with 18 additions and 31 deletions

View file

@ -1,3 +1,5 @@
use std::net::SocketAddr;
use serde::{Serialize, Deserialize};
pub use aquatic_common_tcp::config::*;
@ -19,12 +21,12 @@ pub struct Config {
}
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(default)]
pub struct NetworkConfig {
#[serde(flatten)]
pub socket: SocketConfig,
/// Bind to this address
pub address: SocketAddr,
pub ipv6_only: bool,
#[serde(flatten)]
pub tls: TlsConfig,
pub poll_event_capacity: usize,
@ -63,7 +65,8 @@ impl Default for Config {
impl Default for NetworkConfig {
fn default() -> Self {
Self {
socket: SocketConfig::default(),
address: SocketAddr::from(([0, 0, 0, 0], 3000)),
ipv6_only: false,
tls: TlsConfig::default(),
poll_event_capacity: 4096,
poll_timeout_milliseconds: 50,