From 06b5a84602dc6a5dd76d82c9f88359cdb8cf52da Mon Sep 17 00:00:00 2001 From: Determinant Date: Fri, 28 Jun 2019 15:59:30 -0400 Subject: ... --- src/network.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/network.cpp b/src/network.cpp index 2dc7d1f..adcac99 100644 --- a/src/network.cpp +++ b/src/network.cpp @@ -251,8 +251,16 @@ void peernetwork_listen(peernetwork_t *self, const netaddr_t *listen_addr, Salti SALTICIDAE_CERROR_CATCH(cerror) } +void peernetwork_reg_peer_handler(peernetwork_t *self, + peernetwork_peer_callback_t cb, + void *userdata) { + self->reg_peer_handler([=](const peernetwork_conn_t &conn, bool connected) { + cb(&conn, connected, userdata); + }); +} + void peernetwork_reg_unknown_peer_handler(peernetwork_t *self, - msgnetwork_unknown_peer_callback_t cb, + peernetwork_unknown_peer_callback_t cb, void *userdata) { self->reg_unknown_peer_handler([=](const NetAddr &claimed_addr) { cb(&claimed_addr, userdata); -- cgit v1.2.3-70-g09d2