[Modify] Polish it
This commit is contained in:
parent
8336dd4be0
commit
4f3f165fc0
@ -102,7 +102,8 @@ namespace WebSocketSharp.Server
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
public WebSocketServer ()
|
public WebSocketServer ()
|
||||||
{
|
{
|
||||||
init (null, System.Net.IPAddress.Any, 80, false);
|
var addr = System.Net.IPAddress.Any;
|
||||||
|
init (addr.ToString (), addr, 80, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -219,7 +220,8 @@ namespace WebSocketSharp.Server
|
|||||||
throw new ArgumentOutOfRangeException ("port", msg);
|
throw new ArgumentOutOfRangeException ("port", msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
init (null, System.Net.IPAddress.Any, port, secure);
|
var addr = System.Net.IPAddress.Any;
|
||||||
|
init (addr.ToString (), addr, port, secure);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -298,7 +300,7 @@ namespace WebSocketSharp.Server
|
|||||||
throw new ArgumentOutOfRangeException ("port", msg);
|
throw new ArgumentOutOfRangeException ("port", msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
init (null, address, port, secure);
|
init (address.ToString (), address, port, secure);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -765,9 +767,11 @@ namespace WebSocketSharp.Server
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init (string hostname, System.Net.IPAddress address, int port, bool secure)
|
private void init (
|
||||||
|
string hostname, System.Net.IPAddress address, int port, bool secure
|
||||||
|
)
|
||||||
{
|
{
|
||||||
_hostname = hostname ?? address.ToString ();
|
_hostname = hostname;
|
||||||
_address = address;
|
_address = address;
|
||||||
_port = port;
|
_port = port;
|
||||||
_secure = secure;
|
_secure = secure;
|
||||||
|
Loading…
Reference in New Issue
Block a user