[Modify] Polish it

This commit is contained in:
sta 2017-07-05 15:59:35 +09:00
parent 3ec76decb6
commit 589c88ff01

View File

@ -276,13 +276,15 @@ namespace WebSocketSharp.Server
throw new ArgumentNullException ("address"); throw new ArgumentNullException ("address");
if (!address.IsLocal ()) if (!address.IsLocal ())
throw new ArgumentException ("Not a local IP address: " + address, "address"); throw new ArgumentException ("Not a local IP address.", "address");
if (!port.IsPortNumber ()) if (!port.IsPortNumber ()) {
throw new ArgumentOutOfRangeException ( var msg = "Less than 1 or greater than 65535.";
"port", "Not between 1 and 65535 inclusive: " + port); throw new ArgumentOutOfRangeException ("port", msg);
}
init (null, address, port, secure); var host = convertToString (address);
init (host, address, port, secure);
} }
#endregion #endregion