pub fn parse_server_address(address: &str) -> (String, Option<u16>)Expand description
Parse a server address string into (host, port) components.
Handles various address formats:
- IP:Port (e.g., “127.0.0.1:4433”)
- IP alone (e.g., “127.0.0.1”)
- hostname:port (e.g., “test.hessra.net:443”)
- hostname alone (e.g., “test.hessra.net”)
- IPv6 with brackets and port (e.g., “[::1]:443”)
- IPv6 with brackets, no port (e.g., “[::1]”)
- URLs with protocol (e.g., “https://host:port/path”)
Returns (host, Option