aboutsummaryrefslogtreecommitdiffstats
path: root/mumd/src/network.rs
diff options
context:
space:
mode:
authorEskil Queseth <eskilq@kth.se>2020-10-14 21:10:27 +0200
committerEskil Queseth <eskilq@kth.se>2020-10-14 21:10:27 +0200
commit680c46e6866071ae987d9978316ce2952347fe35 (patch)
treee675ff5d35e3822bdd044d5445652e6c9b392fa7 /mumd/src/network.rs
parenta40d365aacf118b33c07f3353f277eb96c4536a8 (diff)
downloadmum-680c46e6866071ae987d9978316ce2952347fe35.tar.gz
rename and move file to clarify file purpose
Diffstat (limited to 'mumd/src/network.rs')
-rw-r--r--mumd/src/network.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/mumd/src/network.rs b/mumd/src/network.rs
new file mode 100644
index 0000000..1a31ee2
--- /dev/null
+++ b/mumd/src/network.rs
@@ -0,0 +1,21 @@
+pub mod tcp;
+pub mod udp;
+
+use std::net::SocketAddr;
+
+#[derive(Clone, Debug)]
+pub struct ConnectionInfo {
+ socket_addr: SocketAddr,
+ hostname: String,
+ accept_invalid_cert: bool,
+}
+
+impl ConnectionInfo {
+ pub fn new(socket_addr: SocketAddr, hostname: String, accept_invalid_cert: bool) -> Self {
+ Self {
+ socket_addr,
+ hostname,
+ accept_invalid_cert,
+ }
+ }
+}