diff options
author | Josh Blum <josh@joshknows.com> | 2011-02-20 02:41:03 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-02-20 02:41:03 -0800 |
commit | 4787c77bb089bf50a47207bbad55bd65a44769e4 (patch) | |
tree | c89a196ea0161b357a9136c271592ecf1b895127 /host/lib/transport/udp_simple.cpp | |
parent | 2d9838f467013d5397b6daf83afb5ccea92065a4 (diff) | |
download | uhd-4787c77bb089bf50a47207bbad55bd65a44769e4.tar.gz uhd-4787c77bb089bf50a47207bbad55bd65a44769e4.tar.bz2 uhd-4787c77bb089bf50a47207bbad55bd65a44769e4.zip |
udp: try non-blocking recv first for performance
Diffstat (limited to 'host/lib/transport/udp_simple.cpp')
-rw-r--r-- | host/lib/transport/udp_simple.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/host/lib/transport/udp_simple.cpp b/host/lib/transport/udp_simple.cpp index 094f570ff..1ee036d52 100644 --- a/host/lib/transport/udp_simple.cpp +++ b/host/lib/transport/udp_simple.cpp @@ -28,8 +28,6 @@ namespace asio = boost::asio; **********************************************************************/ class udp_simple_impl : public udp_simple{ public: - typedef boost::shared_ptr<asio::ip::udp::socket> socket_sptr; - udp_simple_impl( const std::string &addr, const std::string &port, bool bcast, bool connect ):_connected(connect){ @@ -58,7 +56,7 @@ public: } size_t recv(const asio::mutable_buffer &buff, double timeout){ - if (not wait_for_recv(_socket->native(), timeout)) return 0; + if (not wait_for_recv_ready(_socket->native(), timeout)) return 0; return _socket->receive(asio::buffer(buff)); } |