Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upDocument that UdpSocket::recv and recv_from do not read from the buffer #657
Comments
carllerche
added
the
help wanted
label
Aug 18, 2017
This comment has been minimized.
This comment has been minimized.
|
And add to the docs, if recv returns with Ok(N), the following code must not iterate over complete array, but iterate over a slice of the array buf[0,..,N-1]. |
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Sep 15, 2017
This comment has been minimized.
This comment has been minimized.
|
can be closed? |
This comment has been minimized.
This comment has been minimized.
|
I don't think so. The docs in mio still need some work. Lines 79 to 81 in 5b9d20c |
frehberg
referenced this issue
Oct 3, 2017
Closed
Document that UdpSocket::recv and recv_from do not read from the buff… #740
frehberg
added a commit
to frehberg/mio
that referenced
this issue
Dec 6, 2017
This comment has been minimized.
This comment has been minimized.
|
Finally the patch has been rebased, and could be merged |
carllerche
added a commit
that referenced
this issue
Dec 15, 2017
This comment has been minimized.
This comment has been minimized.
|
The original PR got messed up somehow. I moved the commit to #775. |
frehberg
added a commit
to frehberg/mio
that referenced
this issue
Dec 22, 2017
carllerche
added a commit
that referenced
this issue
Jan 4, 2018
This comment has been minimized.
This comment has been minimized.
|
Thanks. This has been merged (f6f293f). |
carllerche
closed this
Jan 4, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dtolnay commentedAug 18, 2017
It is important for these to document that they only write to the buffer, not read from it, because that means it is safe to pass an uninitialized buffer. It would be wasteful to construct a buffer, initialize it to contain all 0 bytes, and pass it to UdpSocket.