summaryrefslogtreecommitdiff
path: root/src/network.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/network.h')
-rw-r--r--src/network.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/network.h b/src/network.h
index 9b146a9..c02dbc3 100644
--- a/src/network.h
+++ b/src/network.h
@@ -136,7 +136,8 @@ struct WaitingRef
struct Server::Priv
{
- Priv(const Identity & self, vector<unique_ptr<Service>> && svcs);
+ Priv(const Head<LocalState> & local, const Identity & self,
+ vector<unique_ptr<Service>> && svcs);
~Priv();
void doListen();
void doAnnounce();
@@ -144,6 +145,8 @@ struct Server::Priv
Peer & getPeer(const sockaddr_in & paddr);
void handlePacket(Peer &, const TransportHeader &, ReplyBuilder &);
+ void handleLocalHeadChange(const Head<LocalState> &);
+
constexpr static uint16_t discoveryPort { 29665 };
constexpr static chrono::seconds announceInterval { 60 };
@@ -151,6 +154,7 @@ struct Server::Priv
condition_variable announceCondvar;
bool finish = false;
+ Head<LocalState> localHead;
Identity self;
vector<unique_ptr<Service>> services;