Endpoint
Owns one numeric address and host-order port without native layout assumptions. Copying creates an independent fixed-size value. Construction never resolves names, opens a socket, allocates or validates remote reachability. Port zero represents an ephemeral local binding request; connection operations validate their own remote port requirements. Concurrent readonly access is safe while the value is not replaced or moved. No borrowed external storage is retained.
Module std.net
import std.net;Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.
Endpoint
pub struct EndpointOwns one numeric address and host-order port without native layout assumptions. Copying creates an independent fixed-size value. Construction never resolves names, opens a socket, allocates or validates remote reachability. Port zero represents an ephemeral local binding request; connection operations validate their own remote port requirements. Concurrent readonly access is safe while the value is not replaced or moved. No borrowed external storage is retained.
Endpoint.Create
pub static fn Create(Address: Address, Port: u16) -> EndpointCopies exact numeric endpoint values without opening resources. Address: Owned copied IPv4/IPv6 value including scope. Port: Host-order port; zero remains representable for local binding. Return: Independent Data endpoint; no allocation, lookup or I/O.
Endpoint.Address
pub Address: Address;Observes an independent address copy, preserving scope. Return: Owned numeric address; no allocation or I/O.
Endpoint.Port
pub Port: u16;Observes the host-order port without conversion or validation. Return: Exact configured u16 port.