From 680c46e6866071ae987d9978316ce2952347fe35 Mon Sep 17 00:00:00 2001 From: Eskil Queseth Date: Wed, 14 Oct 2020 21:10:27 +0200 Subject: rename and move file to clarify file purpose --- mumd/src/network.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 mumd/src/network.rs (limited to 'mumd/src/network.rs') 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, + } + } +} -- cgit v1.2.1