diff options
author | Determinant <[email protected]> | 2019-06-11 20:13:46 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2019-06-11 20:13:46 -0400 |
commit | 1de4339c53bc55b4b776aac6c63f4ffbd5f00bd1 (patch) | |
tree | 10f648b77a0dfef664943deb16d7410060e6963c /src/network.cpp | |
parent | 047791d61340f8b727be06d37b613b3914dec957 (diff) |
fix bugc-bindings
Diffstat (limited to 'src/network.cpp')
-rw-r--r-- | src/network.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/network.cpp b/src/network.cpp index 42496e8..49bad48 100644 --- a/src/network.cpp +++ b/src/network.cpp @@ -53,6 +53,13 @@ msgnetwork_conn_t *msgnetwork_connect(msgnetwork_t *self, const netaddr_t *addr) return new msgnetwork_conn_t(self->connect(*addr)); } +msgnetwork_conn_t *msgnetwork_conn_copy(const msgnetwork_conn_t *self) { + return new msgnetwork_conn_t(*self); +} + + +void msgnetwork_conn_free(const msgnetwork_conn_t *self) { delete self; } + void msgnetwork_listen(msgnetwork_t *self, const netaddr_t *listen_addr) { self->listen(*listen_addr); } @@ -145,6 +152,12 @@ msgnetwork_conn_t *msgnetwork_conn_new_from_peernetwork_conn(const peernetwork_c return new msgnetwork_conn_t(*conn); } +peernetwork_conn_t *peernetwork_conn_copy(const peernetwork_conn_t *self) { + return new peernetwork_conn_t(*self); +} + +void peernetwork_conn_free(const peernetwork_conn_t *self) { delete self; } + void peernetwork_send_msg_by_move(peernetwork_t *self, msg_t * _moved_msg, const netaddr_t *paddr) { self->_send_msg(std::move(*_moved_msg), *paddr); |