aboutsummaryrefslogtreecommitdiff
path: root/src/messages.rs
diff options
context:
space:
mode:
authordarkgallium <florian+git@aloneinthedark.xyz>2020-05-24 20:40:49 +0200
committerdarkgallium <florian+git@aloneinthedark.xyz>2020-05-24 20:40:49 +0200
commitd2ae084fc1be2671c2a301e689c8632576922785 (patch)
treefb340afde570ffacf42f9349df135624fcb4178f /src/messages.rs
parenta2d25820985b04f15f3c0f38cabfd7130124d943 (diff)
downloaddiplonat-d2ae084fc1be2671c2a301e689c8632576922785.tar.gz
diplonat-d2ae084fc1be2671c2a301e689c8632576922785.zip
add actor for firewall & massive refactor
Diffstat (limited to 'src/messages.rs')
-rw-r--r--src/messages.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/messages.rs b/src/messages.rs
index 31ed48f..09a7c14 100644
--- a/src/messages.rs
+++ b/src/messages.rs
@@ -1,14 +1,16 @@
-#[derive(Debug, Clone)]
+use std::collections::HashSet;
+
+#[derive(Debug, Clone, PartialEq, Eq)]
pub struct PublicExposedPorts {
- pub tcp_ports: Vec<u16>,
- pub udp_ports: Vec<u16>
+ pub tcp_ports: HashSet<u16>,
+ pub udp_ports: HashSet<u16>
}
impl PublicExposedPorts {
pub fn new() -> Self {
return Self {
- tcp_ports: Vec::new(),
- udp_ports: Vec::new()
+ tcp_ports: HashSet::new(),
+ udp_ports: HashSet::new()
}
}
}