aboutsummaryrefslogtreecommitdiff
path: root/src/message.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-12-11 15:53:59 +0100
committerAlex Auvolat <alex@adnab.me>2020-12-11 15:53:59 +0100
commit609f0387ca7e04cf1406f10029115f7c09e3a3d9 (patch)
tree9c2194a7e39f0606477bb40226119825b876a867 /src/message.rs
parentfd8c487b9b9cb6911191e72f4fda8af09d4d0250 (diff)
downloadnetapp-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.rs3
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,
}