aboutsummaryrefslogtreecommitdiff
path: root/src/network.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network.cpp')
-rw-r--r--src/network.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/network.cpp b/src/network.cpp
index 0a83e39..8094ff2 100644
--- a/src/network.cpp
+++ b/src/network.cpp
@@ -233,6 +233,14 @@ void peernetwork_listen(peernetwork_t *self, const netaddr_t *listen_addr, Salti
void peernetwork_stop(peernetwork_t *self) { self->stop(); }
+void peernetwork_reg_unknown_peer_handler(peernetwork_t *self,
+ msgnetwork_unknown_peer_callback_t cb,
+ void *userdata) {
+ self->reg_unknown_peer_handler([=](const NetAddr &addr) {
+ cb(&addr, userdata);
+ });
+}
+
}
#endif