diff options
author | Josh Blum <josh@joshknows.com> | 2010-10-01 18:22:41 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-10-01 18:22:41 -0700 |
commit | 00cd6018405b57a0982b0ce103ff858c646ee18c (patch) | |
tree | d930efd38829ed3d9f9b79c7ceec503202387288 /host/lib/transport/udp_zero_copy_asio.cpp | |
parent | a772f4536e46227df3301c637927c3fbfb69a08d (diff) | |
download | uhd-00cd6018405b57a0982b0ce103ff858c646ee18c.tar.gz uhd-00cd6018405b57a0982b0ce103ff858c646ee18c.tar.bz2 uhd-00cd6018405b57a0982b0ce103ff858c646ee18c.zip |
uhd: implemented a double timeout (in seconds) for send and recv chains
converted all size_t timeout_ms to double timeout
bounded and alignment buffer now take double timeout
added timeout to device::send and zero_copy_if::get_send_buff
Diffstat (limited to 'host/lib/transport/udp_zero_copy_asio.cpp')
-rw-r--r-- | host/lib/transport/udp_zero_copy_asio.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/host/lib/transport/udp_zero_copy_asio.cpp b/host/lib/transport/udp_zero_copy_asio.cpp index 0a6c9f2af..3130830a5 100644 --- a/host/lib/transport/udp_zero_copy_asio.cpp +++ b/host/lib/transport/udp_zero_copy_asio.cpp @@ -109,11 +109,11 @@ private: boost::asio::io_service _io_service; int _sock_fd; - ssize_t recv(const boost::asio::mutable_buffer &buff, size_t timeout_ms){ + ssize_t recv(const boost::asio::mutable_buffer &buff, double timeout){ //setup timeval for timeout timeval tv; tv.tv_sec = 0; - tv.tv_usec = timeout_ms*1000; + tv.tv_usec = long(timeout*1e6); //setup rset for timeout fd_set rset; |