diff options
author | Alex Auvolat <alex@adnab.me> | 2020-12-11 15:53:59 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-12-11 15:53:59 +0100 |
commit | 609f0387ca7e04cf1406f10029115f7c09e3a3d9 (patch) | |
tree | 9c2194a7e39f0606477bb40226119825b876a867 /src/message.rs | |
parent | fd8c487b9b9cb6911191e72f4fda8af09d4d0250 (diff) | |
download | netapp-609f0387ca7e04cf1406f10029115f7c09e3a3d9.tar.gz netapp-609f0387ca7e04cf1406f10029115f7c09e3a3d9.zip |
Add ability to specify our public addr for people to contact us back
Diffstat (limited to 'src/message.rs')
-rw-r--r-- | src/message.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/message.rs b/src/message.rs index bd54523..9ab14f9 100644 --- a/src/message.rs +++ b/src/message.rs @@ -1,3 +1,5 @@ +use std::net::IpAddr; + use serde::{Deserialize, Serialize}; pub type MessageKind = u32; @@ -24,6 +26,7 @@ pub trait Message: Serialize + for<'de> Deserialize<'de> + Send + Sync { #[derive(Serialize, Deserialize)] pub(crate) struct HelloMessage { + pub server_addr: Option<IpAddr>, pub server_port: u16, } |