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, 6 insertions, 2 deletions
diff --git a/src/network.cpp b/src/network.cpp
index bc539f4..2f84f25 100644
--- a/src/network.cpp
+++ b/src/network.cpp
@@ -76,9 +76,9 @@ void msgnetwork_send_msg_deferred_by_move(msgnetwork_t *self,
self->_send_msg_deferred(std::move(*_moved_msg), *conn);
}
-msgnetwork_conn_t *msgnetwork_connect(msgnetwork_t *self, const netaddr_t *addr, SalticidaeCError *cerror) {
+msgnetwork_conn_t *msgnetwork_connect(msgnetwork_t *self, const netaddr_t *addr, bool blocking, SalticidaeCError *cerror) {
SALTICIDAE_CERROR_TRY(cerror)
- return new msgnetwork_conn_t(self->connect(*addr));
+ return new msgnetwork_conn_t(self->connect(*addr, blocking));
SALTICIDAE_CERROR_CATCH(cerror)
return nullptr;
}
@@ -151,6 +151,10 @@ const netaddr_t *msgnetwork_conn_get_addr(const msgnetwork_conn_t *conn) {
return &(*conn)->get_addr();
}
+const x509_t *msgnetwork_conn_get_peer_cert(const msgnetwork_conn_t *conn) {
+ return (*conn)->get_peer_cert();
+}
+
// PeerNetwork
peernetwork_config_t *peernetwork_config_new() {