From 1e65500d791461be9aa7a2d2646d463f536f49e3 Mon Sep 17 00:00:00 2001 From: Ciro Nishiguchi Date: Mon, 25 Mar 2019 13:11:17 -0500 Subject: uhd: add udp boost asio implementation of transport interface --- host/lib/transport/udp_simple.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'host/lib/transport/udp_simple.cpp') diff --git a/host/lib/transport/udp_simple.cpp b/host/lib/transport/udp_simple.cpp index 48d7b500e..e10dff7f8 100644 --- a/host/lib/transport/udp_simple.cpp +++ b/host/lib/transport/udp_simple.cpp @@ -5,9 +5,9 @@ // SPDX-License-Identifier: GPL-3.0-or-later // -#include "udp_common.hpp" #include #include +#include #include using namespace uhd::transport; @@ -53,7 +53,9 @@ public: size_t recv(const asio::mutable_buffer& buff, double timeout) { - if (not wait_for_recv_ready(_socket->native_handle(), timeout)) + const int32_t timeout_ms = static_cast(timeout * 1000); + + if (not wait_for_recv_ready(_socket->native_handle(), timeout_ms)) return 0; return _socket->receive_from(asio::buffer(buff), _recv_endpoint); } -- cgit v1.2.3