aboutsummaryrefslogtreecommitdiffstats
path: root/mumd/src/network.rs
diff options
context:
space:
mode:
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,
+ }
+ }
+}