From ff904b23147e72db4f7f77f8269242d9a5a0859e Mon Sep 17 00:00:00 2001 From: Determinant Date: Fri, 21 Jun 2019 14:36:06 -0400 Subject: ... --- src/network.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/network.cpp b/src/network.cpp index 4067531..122270b 100644 --- a/src/network.cpp +++ b/src/network.cpp @@ -44,10 +44,13 @@ void msgnetwork_config_queue_capacity(msgnetwork_config_t *self, size_t cap) { self->queue_capacity(cap); } -void msgnetwork_send_msg_by_move(msgnetwork_t *self, +void msgnetwork_send_msg(msgnetwork_t *self, const msg_t *msg, const msgnetwork_conn_t *conn) { + self->_send_msg(*msg, *conn); +} + +void msgnetwork_send_msg_deferred_by_move(msgnetwork_t *self, msg_t *_moved_msg, const msgnetwork_conn_t *conn) { self->_send_msg_deferred(std::move(*_moved_msg), *conn); - //delete _moved_msg; } msgnetwork_conn_t *msgnetwork_connect(msgnetwork_t *self, const netaddr_t *addr, SalticidaeCError *cerror) { @@ -211,17 +214,20 @@ peernetwork_conn_t *peernetwork_conn_copy(const 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) { +void peernetwork_send_msg(peernetwork_t *self, + const msg_t * msg, const netaddr_t *paddr) { + self->_send_msg(*msg, *paddr); +} + +void peernetwork_send_msg_deferred_by_move(peernetwork_t *self, + msg_t * _moved_msg, const netaddr_t *paddr) { self->_send_msg_deferred(std::move(*_moved_msg), *paddr); - //delete _moved_msg; } void peernetwork_multicast_msg_by_move(peernetwork_t *self, - msg_t *_moved_msg, - const netaddr_array_t *paddrs) { + msg_t *_moved_msg, + const netaddr_array_t *paddrs) { self->_multicast_msg(std::move(*_moved_msg), *paddrs); - //delete _moved_msg; } void peernetwork_listen(peernetwork_t *self, const netaddr_t *listen_addr, SalticidaeCError *cerror) { -- cgit v1.2.3-70-g09d2