From 50dbc034090614d004d097c7a45b0a28a3bbb80b Mon Sep 17 00:00:00 2001 From: Keuin Date: Tue, 5 Sep 2023 01:52:56 +0800 Subject: feature: 0-rtt connection phase extension --- src/config.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index 7eee270..1fba27f 100644 --- a/src/config.rs +++ b/src/config.rs @@ -3,6 +3,8 @@ use serde_derive::{Deserialize, Serialize}; #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Server { pub listen: String, + #[serde(default = "default_false")] + pub no_ack_extension: bool, } #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] @@ -14,6 +16,8 @@ pub struct Service { #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Client { pub addr: String, + #[serde(default = "default_false")] + pub no_ack: bool, } #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] @@ -28,3 +32,7 @@ pub struct Root { fn default_true() -> bool { true } + +fn default_false() -> bool { + false +} -- cgit v1.2.3