last_connection expiration

This commit is contained in:
John Smith
2022-04-17 19:10:10 -04:00
parent 5527740f6a
commit 9cee8c292f
6 changed files with 176 additions and 21 deletions

View File

@@ -421,6 +421,15 @@ pub enum ProtocolType {
WSS,
}
impl ProtocolType {
pub fn is_connection_oriented(&self) -> bool {
matches!(
self,
ProtocolType::TCP | ProtocolType::WS | ProtocolType::WSS
)
}
}
#[derive(Copy, Clone, Debug, Default, Serialize, Deserialize)]
pub struct ProtocolSet {
pub udp: bool,