summaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-09-30 14:36:24 -0700
committerJosh Blum <josh@joshknows.com>2010-09-30 14:36:24 -0700
commit2c8a7c7debf19d92065661cc1d258f97bd38e224 (patch)
tree93723da79bd0dc800529e80aa6411d1c187970a5 /host/include
parente4fffed05dda57bb37d693a3a26ea6a903c925f7 (diff)
downloaduhd-2c8a7c7debf19d92065661cc1d258f97bd38e224.tar.gz
uhd-2c8a7c7debf19d92065661cc1d258f97bd38e224.tar.bz2
uhd-2c8a7c7debf19d92065661cc1d258f97bd38e224.zip
uhd: implemented recv timeout for zero copy interface
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/transport/zero_copy.hpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/host/include/uhd/transport/zero_copy.hpp b/host/include/uhd/transport/zero_copy.hpp
index 513291b63..8ecafd3fb 100644
--- a/host/include/uhd/transport/zero_copy.hpp
+++ b/host/include/uhd/transport/zero_copy.hpp
@@ -122,9 +122,10 @@ namespace uhd{ namespace transport{
/*!
* Get a new receive buffer from this transport object.
+ * \param timeout_ms the timeout to get the buffer in ms
* \return a managed buffer, or null sptr on timeout/error
*/
- virtual managed_recv_buffer::sptr get_recv_buff(void) = 0;
+ virtual managed_recv_buffer::sptr get_recv_buff(size_t timeout_ms) = 0;
/*!
* Get the maximum number of receive frames:
@@ -171,16 +172,19 @@ namespace uhd{ namespace transport{
/*!
* Get a new receive buffer from this transport object.
+ * \param timeout_ms the timeout to get the buffer in ms
+ * \return a managed buffer, or null sptr on timeout/error
*/
- managed_recv_buffer::sptr get_recv_buff(void);
+ managed_recv_buffer::sptr get_recv_buff(size_t timeout_ms);
private:
/*!
* Perform a private copying recv.
* \param buff the buffer to write data into
+ * \param timeout_ms the timeout to get the buffer in ms
* \return the number of bytes written to buff, 0 for timeout, negative for error
*/
- virtual ssize_t recv(const boost::asio::mutable_buffer &buff) = 0;
+ virtual ssize_t recv(const boost::asio::mutable_buffer &buff, size_t timeout_ms) = 0;
UHD_PIMPL_DECL(impl) _impl;
};
@@ -204,6 +208,7 @@ namespace uhd{ namespace transport{
/*!
* Get a new send buffer from this transport object.
+ * \return a managed buffer, or null sptr on timeout/error
*/
managed_send_buffer::sptr get_send_buff(void);