diff options
| author | Eskil Queseth <eskilq@kth.se> | 2020-10-14 19:48:05 +0200 |
|---|---|---|
| committer | Eskil Queseth <eskilq@kth.se> | 2020-10-14 19:48:05 +0200 |
| commit | a40d365aacf118b33c07f3353f277eb96c4536a8 (patch) | |
| tree | 1a5e623da01745b3d2a2d1b1d5958a22cd0e382a /mumd/src/network/mod.rs | |
| parent | c0855405832ce47f75fa6e1ff7a33e51a8b36903 (diff) | |
| parent | 6ac72067a75d5e1904226efb5c45bcf0e54a0ae5 (diff) | |
| download | mum-a40d365aacf118b33c07f3353f277eb96c4536a8.tar.gz | |
Merge remote-tracking branch 'origin/commands' into main
Diffstat (limited to 'mumd/src/network/mod.rs')
| -rw-r--r-- | mumd/src/network/mod.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mumd/src/network/mod.rs b/mumd/src/network/mod.rs index f7a6a76..1a31ee2 100644 --- a/mumd/src/network/mod.rs +++ b/mumd/src/network/mod.rs @@ -1,2 +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, + } + } +} |
