summaryrefslogtreecommitdiff
path: root/src/network.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network.cpp')
-rw-r--r--src/network.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/network.cpp b/src/network.cpp
index 1d38bdd..b735262 100644
--- a/src/network.cpp
+++ b/src/network.cpp
@@ -116,6 +116,13 @@ optional<Identity> Peer::identity() const
return nullopt;
}
+const sockaddr_in & Peer::address() const
+{
+ if (auto speer = p->speer.lock())
+ return speer->addr;
+ throw runtime_error("Server no longer running");
+}
+
void Peer::Priv::notifyWatchers()
{
if (auto slist = list.lock()) {