Function parse_server_name
Source pub fn parse_server_name(hostname: &str) -> Result<String>
Expand description
Parse server name from hostname for TLS SNI (Server Name Indication).
§Arguments
hostname - Hostname to parse (without port)
§Returns
A string suitable for TLS server name indication
§Errors
Returns an error if the hostname is invalid.