diff options
author | Josh Blum <josh@joshknows.com> | 2010-07-09 20:09:45 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-07-09 20:09:45 -0700 |
commit | c898ca9751d1b274ae8f8f7afc2d5bc54b6ef30c (patch) | |
tree | 68608f738c82c43ba0ace42089011f51723afdd8 /host/lib/transport/udp_zero_copy_asio.cpp | |
parent | 75537e896bbd0aeb8d988b6ad33b5ab2d35b316f (diff) | |
download | uhd-c898ca9751d1b274ae8f8f7afc2d5bc54b6ef30c.tar.gz uhd-c898ca9751d1b274ae8f8f7afc2d5bc54b6ef30c.tar.bz2 uhd-c898ca9751d1b274ae8f8f7afc2d5bc54b6ef30c.zip |
uhd: ssize_t for phony zero copy return types, null sptr for timeout/error with get managed buffers
Diffstat (limited to 'host/lib/transport/udp_zero_copy_asio.cpp')
-rw-r--r-- | host/lib/transport/udp_zero_copy_asio.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/host/lib/transport/udp_zero_copy_asio.cpp b/host/lib/transport/udp_zero_copy_asio.cpp index e3f3ef5bf..98451f188 100644 --- a/host/lib/transport/udp_zero_copy_asio.cpp +++ b/host/lib/transport/udp_zero_copy_asio.cpp @@ -105,7 +105,7 @@ private: boost::asio::io_service _io_service; int _sock_fd; - size_t recv(const boost::asio::mutable_buffer &buff){ + ssize_t recv(const boost::asio::mutable_buffer &buff){ //setup timeval for timeout timeval tv; tv.tv_sec = 0; @@ -122,17 +122,15 @@ private: return ::recv( _sock_fd, boost::asio::buffer_cast<char *>(buff), - boost::asio::buffer_size(buff), - 0 + boost::asio::buffer_size(buff), 0 ); } - size_t send(const boost::asio::const_buffer &buff){ + ssize_t send(const boost::asio::const_buffer &buff){ return ::send( _sock_fd, boost::asio::buffer_cast<const char *>(buff), - boost::asio::buffer_size(buff), - 0 + boost::asio::buffer_size(buff), 0 ); } }; |