aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2020-02-25 17:18:00 -0500
committerDeterminant <[email protected]>2020-02-25 17:18:00 -0500
commitd00583942ed67b301d9b8576180e0432d62c09c1 (patch)
tree23001a9b3afb1b453999d950189568104e7e8cc4
parent53c1165645ad4fa29fbab68440a69881922c28f4 (diff)
...
-rw-r--r--include/salticidae/network.h1
-rw-r--r--src/network.cpp4
2 files changed, 5 insertions, 0 deletions
diff --git a/include/salticidae/network.h b/include/salticidae/network.h
index 03252b4..e5cfa87 100644
--- a/include/salticidae/network.h
+++ b/include/salticidae/network.h
@@ -1510,6 +1510,7 @@ msgnetwork_conn_t *msgnetwork_conn_new_from_peernetwork_conn(const peernetwork_c
peernetwork_conn_t *peernetwork_conn_new_from_msgnetwork_conn_unsafe(const msgnetwork_conn_t *conn);
peernetwork_conn_t *peernetwork_conn_copy(const peernetwork_conn_t *self);
netaddr_t *peernetwork_conn_get_peer_addr(const peernetwork_conn_t *self);
+peerid_t *peernetwork_conn_get_peer_id(const peernetwork_conn_t *self);
void peernetwork_conn_free(const peernetwork_conn_t *self);
bool peernetwork_send_msg(peernetwork_t *self, const msg_t * msg, const peerid_t *peer);
int32_t peernetwork_send_msg_deferred_by_move(peernetwork_t *self, msg_t * _moved_msg, const peerid_t *peer);
diff --git a/src/network.cpp b/src/network.cpp
index 0edc407..4bbd4c5 100644
--- a/src/network.cpp
+++ b/src/network.cpp
@@ -278,6 +278,10 @@ netaddr_t *peernetwork_conn_get_peer_addr(const peernetwork_conn_t *self) {
return new netaddr_t((*self)->get_peer_addr());
}
+peerid_t *peernetwork_conn_get_peer_id(const peernetwork_conn_t *self) {
+ return new peerid_t((*self)->get_peer_id());
+}
+
void peernetwork_conn_free(const peernetwork_conn_t *self) { delete self; }
bool peernetwork_send_msg(peernetwork_t *self, const msg_t * msg, const peerid_t *peer) {