最佳答案
什么是主机名的有效字符? 这将是一个像网络计算机或网络域名。
To put it in context, I am writing a PC game which connects to a remote server; so I have a field for hostname and a field for port. Obviously the port is a number in the Short range, but I need to know what all the possible hostname characters are (and any other pattern that might be required - does a hostname need to start with a letter?).
主机名的示例包括 localhost
或 google.com
。