From 4e77a29c91d4e05c39011e1e2e214317fcf93617 Mon Sep 17 00:00:00 2001 From: whitequark Date: Sat, 22 Jun 2019 07:03:15 +0000 Subject: [PATCH] Clarify TcpSocket::recv_queue() semantics. NFC. --- src/socket/tcp.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/socket/tcp.rs b/src/socket/tcp.rs index 1618668..551490f 100644 --- a/src/socket/tcp.rs +++ b/src/socket/tcp.rs @@ -774,7 +774,9 @@ impl<'a> TcpSocket<'a> { self.tx_buffer.len() } - /// Return the amount of octets queued in the receive buffer. + /// Return the amount of octets queued in the receive buffer. This value can be larger than + /// the slice read by the next `recv` or `peek` call because it includes all queued octets, + /// and not only the octets that may be returned as a contiguous slice. /// /// Note that the Berkeley sockets interface does not have an equivalent of this API. pub fn recv_queue(&self) -> usize {