Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a0a18d3

Browse files
committedOct 24, 2024·
Include examples for textual representation of SocketAddrV6
(Examples are from the IPv6 address range reserved for documentation in IETF RFC 3849.)
1 parent 6391d42 commit a0a18d3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎library/core/src/net/socket_addr.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ pub struct SocketAddrV4 {
106106
/// - A colon (`:`)
107107
/// - The port, encoded as a decimal integer.
108108
///
109+
/// For example, the string `[2001:db8::413]:443` represents a `SocketAddrV6`
110+
/// with the address `2001:db8::413` and port `443`. The string
111+
/// `[2001:db8::413%612]:443` represents the same address and port, with a
112+
/// scope identifier of `612`.
113+
///
109114
/// Other formats are not accepted.
110115
///
111116
/// [IETF RFC 5952]: https://tools.ietf.org/html/rfc5952#section-6

0 commit comments

Comments
 (0)
Please sign in to comment.