about summary refs log tree commit diff
path: root/library/std/src/net/socket_addr.rs
AgeCommit message (Collapse)AuthorLines
2025-04-04ToSocketAddrs: fix typoRalf Jung-1/+1
2025-02-12std: replace the `FromInner` implementation for addresses with private ↵joboet-44/+2
conversion functions Having these implementation available crate-wide means that platforms not using sockets for their networking code have to stub out the libc definitions required to support them. This PR moves the conversions to private helper functions that are only available where actually needed. I also fixed the signature of the function converting from a C socket address to a Rust one: taking a reference to a `sockaddr_storage` resulted in unsound usage inside `LookupHost::next`, which could create a reference to a structure smaller than `sockaddr_storage`. Thus I've replaced the argument type with a pointer and made the function `unsafe`.
2025-02-02std: move network code into `sys`joboet-2/+1
As per #117276, this PR moves `sys_common::net` and the `sys::pal::net` into the newly created `sys::net` module. In order to support #135141, I've moved all the current network code into a separate `connection` module, future functions like `hostname` can live in separate modules. I'll probably do a follow-up PR and clean up some of the actual code, this is mostly just a reorganization.
2024-09-29Fix std tests for wasm32-wasip2 targetNicola Krumschmidt-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-9/+4
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2023-02-26Move IpAddr and SocketAddr to coreLinus Färnstrand-674/+15
2023-01-25Stabilize the const_socketaddr featureLinus Färnstrand-13/+13
2022-09-12Flatten `net` module again.Markus Reiter-0/+974