|
|
|
|
@ -112,12 +112,8 @@ namespace WebSocketSharp.Server
|
|
|
|
|
/// <paramref name="port"/> isn't between 1 and 65535 inclusive.
|
|
|
|
|
/// </exception>
|
|
|
|
|
public WebSocketServer (int port)
|
|
|
|
|
: this (port, port == 443)
|
|
|
|
|
{
|
|
|
|
|
if (!port.IsPortNumber ())
|
|
|
|
|
throw new ArgumentOutOfRangeException (
|
|
|
|
|
"port", "Not between 1 and 65535 inclusive: " + port);
|
|
|
|
|
|
|
|
|
|
init (System.Net.IPAddress.Any, port, port == 443);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
@ -188,15 +184,16 @@ namespace WebSocketSharp.Server
|
|
|
|
|
/// A <see cref="bool"/> that indicates providing a secure connection or not.
|
|
|
|
|
/// (<c>true</c> indicates providing a secure connection.)
|
|
|
|
|
/// </param>
|
|
|
|
|
/// <exception cref="ArgumentException">
|
|
|
|
|
/// Pair of <paramref name="port"/> and <paramref name="secure"/> is invalid.
|
|
|
|
|
/// </exception>
|
|
|
|
|
/// <exception cref="ArgumentOutOfRangeException">
|
|
|
|
|
/// <paramref name="port"/> isn't between 1 and 65535 inclusive.
|
|
|
|
|
/// </exception>
|
|
|
|
|
public WebSocketServer (int port, bool secure)
|
|
|
|
|
: this (System.Net.IPAddress.Any, port, secure)
|
|
|
|
|
{
|
|
|
|
|
if (!port.IsPortNumber ())
|
|
|
|
|
throw new ArgumentOutOfRangeException (
|
|
|
|
|
"port", "Not between 1 and 65535 inclusive: " + port);
|
|
|
|
|
|
|
|
|
|
init (System.Net.IPAddress.Any, port, secure);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
@ -255,15 +252,7 @@ namespace WebSocketSharp.Server
|
|
|
|
|
/// <paramref name="address"/> is <see langword="null"/>.
|
|
|
|
|
/// </exception>
|
|
|
|
|
/// <exception cref="ArgumentException">
|
|
|
|
|
/// <para>
|
|
|
|
|
/// <paramref name="address"/> isn't a local IP address.
|
|
|
|
|
/// </para>
|
|
|
|
|
/// <para>
|
|
|
|
|
/// -or-
|
|
|
|
|
/// </para>
|
|
|
|
|
/// <para>
|
|
|
|
|
/// Pair of <paramref name="port"/> and <paramref name="secure"/> is invalid.
|
|
|
|
|
/// </para>
|
|
|
|
|
/// <paramref name="address"/> isn't a local IP address.
|
|
|
|
|
/// </exception>
|
|
|
|
|
/// <exception cref="ArgumentOutOfRangeException">
|
|
|
|
|
/// <paramref name="port"/> isn't between 1 and 65535 inclusive.
|
|
|
|
|
@ -280,10 +269,6 @@ namespace WebSocketSharp.Server
|
|
|
|
|
throw new ArgumentOutOfRangeException (
|
|
|
|
|
"port", "Not between 1 and 65535 inclusive: " + port);
|
|
|
|
|
|
|
|
|
|
if ((port == 80 && secure) || (port == 443 && !secure))
|
|
|
|
|
throw new ArgumentException (
|
|
|
|
|
String.Format ("An invalid pair of 'port' and 'secure': {0}, {1}", port, secure));
|
|
|
|
|
|
|
|
|
|
init (address, port, secure);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|