pub fn peek(
stream: &Stream,
buffer: &mut [u8],
within: Duration,
) -> Result<usize>Expand description
What the peer at the other end of stream has sent so far, up to buffer’s length, without
consuming it: the next read gets the same bytes. Waits up to within for the first of them;
0 when the peer sent nothing by then, or closed.
§Errors
The connection fails while it is looked at.