diff options
author | Ciro Nishiguchi <ciro.nishiguchi@ni.com> | 2019-03-25 13:11:17 -0500 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 11:49:20 -0800 |
commit | 1e65500d791461be9aa7a2d2646d463f536f49e3 (patch) | |
tree | a603d8b56d41012e39f56531f017d0ebb5dedebd /host/lib/transport/tcp_zero_copy.cpp | |
parent | 6f3c201a802079a3d565c5f14e1222743097b459 (diff) | |
download | uhd-1e65500d791461be9aa7a2d2646d463f536f49e3.tar.gz uhd-1e65500d791461be9aa7a2d2646d463f536f49e3.tar.bz2 uhd-1e65500d791461be9aa7a2d2646d463f536f49e3.zip |
uhd: add udp boost asio implementation of transport interface
Diffstat (limited to 'host/lib/transport/tcp_zero_copy.cpp')
-rw-r--r-- | host/lib/transport/tcp_zero_copy.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/host/lib/transport/tcp_zero_copy.cpp b/host/lib/transport/tcp_zero_copy.cpp index 5cb713427..01bca900f 100644 --- a/host/lib/transport/tcp_zero_copy.cpp +++ b/host/lib/transport/tcp_zero_copy.cpp @@ -5,11 +5,11 @@ // SPDX-License-Identifier: GPL-3.0-or-later // -#include "udp_common.hpp" #include <uhd/transport/buffer_pool.hpp> #include <uhd/transport/tcp_zero_copy.hpp> #include <uhd/utils/log.hpp> #include <uhdlib/utils/atomic.hpp> +#include <uhdlib/transport/udp_common.hpp> #include <boost/format.hpp> #include <boost/make_shared.hpp> #include <chrono> @@ -52,8 +52,9 @@ public: return make(this, _mem, size_t(_len)); } #endif + const int32_t timeout_ms = static_cast<int32_t>(timeout * 1000); - if (wait_for_recv_ready(_sock_fd, timeout)) { + if (wait_for_recv_ready(_sock_fd, timeout_ms)) { _len = ::recv(_sock_fd, (char*)_mem, _frame_size, 0); index++; // advances the caller's buffer return make(this, _mem, size_t(_len)); |