diff options
author | Marcus Müller <marcus@hostalia.de> | 2020-06-19 11:07:54 +0200 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2020-06-19 11:07:54 +0200 |
commit | e76d04ca2f4f15e3b1a1ab2a81dd52c4e6d2472c (patch) | |
tree | 1d86f68fceed9cd7204d9a79e816dc06c15feaf4 /gr-blocks/lib/socket_pdu_impl.cc | |
parent | 98348e37209aa7daeb96fe5ead815e5b083dc6da (diff) | |
parent | 39311758cb1e6a7424d3213b3eb2c65c8c4dcfe1 (diff) |
Move from SWIG to Pybind11
Goodbye, and thanks for all the fish, SWIG.
Please refer to docs/PYBIND11.md for details on how to deal with Pybind.
Diffstat (limited to 'gr-blocks/lib/socket_pdu_impl.cc')
-rw-r--r-- | gr-blocks/lib/socket_pdu_impl.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gr-blocks/lib/socket_pdu_impl.cc b/gr-blocks/lib/socket_pdu_impl.cc index cd74d60603..bdbe1eb2d2 100644 --- a/gr-blocks/lib/socket_pdu_impl.cc +++ b/gr-blocks/lib/socket_pdu_impl.cc @@ -89,7 +89,7 @@ socket_pdu_impl::socket_pdu_impl(std::string type, start_tcp_accept(); set_msg_handler(pdu::pdu_port_id(), - boost::bind(&socket_pdu_impl::tcp_server_send, this, _1)); + [this](pmt::pmt_t msg) { this->tcp_server_send(msg); }); } else if (type == "TCP_CLIENT") { boost::system::error_code error = boost::asio::error::host_not_found; d_tcp_socket.reset(new boost::asio::ip::tcp::socket(d_io_service)); @@ -99,7 +99,7 @@ socket_pdu_impl::socket_pdu_impl(std::string type, d_tcp_socket->set_option(boost::asio::ip::tcp::no_delay(d_tcp_no_delay)); set_msg_handler(pdu::pdu_port_id(), - boost::bind(&socket_pdu_impl::tcp_client_send, this, _1)); + [this](pmt::pmt_t msg) { this->tcp_client_send(msg); }); d_tcp_socket->async_read_some( boost::asio::buffer(d_rxbuf), @@ -119,7 +119,7 @@ socket_pdu_impl::socket_pdu_impl(std::string type, boost::asio::placeholders::bytes_transferred)); set_msg_handler(pdu::pdu_port_id(), - boost::bind(&socket_pdu_impl::udp_send, this, _1)); + [this](pmt::pmt_t msg) { this->udp_send(msg); }); } else if (type == "UDP_CLIENT") { d_udp_socket.reset( new boost::asio::ip::udp::socket(d_io_service, d_udp_endpoint)); @@ -132,7 +132,7 @@ socket_pdu_impl::socket_pdu_impl(std::string type, boost::asio::placeholders::bytes_transferred)); set_msg_handler(pdu::pdu_port_id(), - boost::bind(&socket_pdu_impl::udp_send, this, _1)); + [this](pmt::pmt_t msg) { this->udp_send(msg); }); } else throw std::runtime_error("gr::blocks:socket_pdu: unknown socket type"); |