about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/path-ordering.js
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-10-03 20:35:38 +0000
committerbors <bors@rust-lang.org>2023-10-03 20:35:38 +0000
commit187b8131d4f760f856b214fce34534903276f2ef (patch)
treefc9e56517593ab46d15bc3281b139db92fae2711 /tests/rustdoc-js-std/path-ordering.js
parent36aab8df0ab8a76f1c4f95ce8becefdd8a6fe526 (diff)
parentadb22b92dd3674cf9b661504575b53245eec7f65 (diff)
downloadrust-187b8131d4f760f856b214fce34534903276f2ef.tar.gz
rust-187b8131d4f760f856b214fce34534903276f2ef.zip
Auto merge of #105394 - Patiga:improve-udpsocket-docs, r=workingjubilee
Improve UdpSocket documentation

I tried working with `UdpSocket` and ran into `EINVAL` errors with no clear indication of what causes the error. Also, it was uncharacteristically hard to figure this module out, compared to other Rust `std` modules.

1. `send` and `send_to` return a `usize` This one is just clarity. Usually, returned `usize`s indicate that the buffer might have only been sent partially. This is not the case with UDP. Since that `usize` must always be `buffer.len()`, I have documented that.

2. `bind` limits `connect` and `send_to` When you bind to a limited address space like localhost, you can only `connect` to addresses in that same address space. Error kind: `AddrNotAvailable`.

3. `connect`ing to localhost locks you to localhost On Linux, if you first `connect` to localhost, subsequent `connect`s to
non-localhost addresses fail. Error kind: `InvalidInput`.

For debugging the third one, it was really hard to find someone else who already had that problem. I only managed to find this thread: https://www.mail-archive.com/netdev@vger.kernel.org/msg159519.html
Diffstat (limited to 'tests/rustdoc-js-std/path-ordering.js')
0 files changed, 0 insertions, 0 deletions