diff options
author | Determinant <[email protected]> | 2019-06-22 01:04:36 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2019-06-22 01:04:36 -0400 |
commit | 95257d41d0b946197093ad67657fb3d4f7f9030f (patch) | |
tree | 48986fe06085b83e45c633da0be97e586be722c7 /src/network.cpp | |
parent | 729eb87a12bb0efd3c2a4cc381f39e13dfd4fbf9 (diff) |
update C API; fix bugs
Diffstat (limited to 'src/network.cpp')
-rw-r--r-- | src/network.cpp | 8 |
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() { |