[Modify] Polish it
This commit is contained in:
parent
0f97aea558
commit
93fb098bb1
@ -285,11 +285,12 @@ 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 = "It is 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);
|
init (null, address, port, secure);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user