summaryrefslogtreecommitdiff
path: root/src/network.cpp
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2021-04-18 22:25:17 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2021-04-18 22:28:59 +0200
commit9aaba1211c95dc7e08437a7cca73452181e296d6 (patch)
treeb11cb72c1515fb7b284e98708d6b6f4a8fbae3ab /src/network.cpp
parentc3d6046b25ef0786b8d2919dfa9db4eb05114501 (diff)
Initial support for FRP behaviors
Diffstat (limited to 'src/network.cpp')
-rw-r--r--src/network.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/network.cpp b/src/network.cpp
index f33c097..259ae5e 100644
--- a/src/network.cpp
+++ b/src/network.cpp
@@ -38,6 +38,11 @@ const Head<LocalState> & Server::localHead() const
return p->localHead;
}
+const Bhv<LocalState> & Server::localState() const
+{
+ return p->localState;
+}
+
const Identity & Server::identity() const
{
return p->self;
@@ -203,6 +208,7 @@ Server::Priv::Priv(const Head<LocalState> & local, const Identity & self,
vector<unique_ptr<Service>> && svcs):
self(self),
// Watching needs to start after self is initialized
+ localState(local.behavior()),
localHead(local.watch(std::bind(&Priv::handleLocalHeadChange, this, std::placeholders::_1))),
services(std::move(svcs))
{