Fix for pull request #115, added the HttpServer (System.Net.IPAddress, int) constructor
This commit is contained in:
parent
c10c9886ef
commit
d4fc8da7a8
@ -19,7 +19,8 @@ namespace Example3
|
|||||||
*/
|
*/
|
||||||
var httpsv = new HttpServer (4649);
|
var httpsv = new HttpServer (4649);
|
||||||
//var httpsv = new HttpServer (5963, true);
|
//var httpsv = new HttpServer (5963, true);
|
||||||
//var httpsv = new HttpServer (System.Net.IPAddress.Parse ("127.0.0.1"), 4649, false);
|
//var httpsv = new HttpServer (System.Net.IPAddress.Parse ("127.0.0.1"), 4649);
|
||||||
|
//var httpsv = new HttpServer (System.Net.IPAddress.Parse ("127.0.0.1"), 5963, true);
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
// To change the logging level.
|
// To change the logging level.
|
||||||
httpsv.Log.Level = LogLevel.Trace;
|
httpsv.Log.Level = LogLevel.Trace;
|
||||||
|
@ -136,6 +136,39 @@ namespace WebSocketSharp.Server
|
|||||||
init ("*", port, secure);
|
init ("*", port, secure);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="HttpServer"/> class with
|
||||||
|
/// the specified <paramref name="address"/> and <paramref name="port"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// <para>
|
||||||
|
/// An instance initialized by this constructor listens for the incoming
|
||||||
|
/// connection requests on <paramref name="port"/>.
|
||||||
|
/// </para>
|
||||||
|
/// <para>
|
||||||
|
/// If <paramref name="port"/> is 443, that instance provides a secure connection.
|
||||||
|
/// </para>
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="address">
|
||||||
|
/// A <see cref="System.Net.IPAddress"/> that represents the local IP address of the server.
|
||||||
|
/// </param>
|
||||||
|
/// <param name="port">
|
||||||
|
/// An <see cref="int"/> that represents the port number on which to listen.
|
||||||
|
/// </param>
|
||||||
|
/// <exception cref="ArgumentNullException">
|
||||||
|
/// <paramref name="address"/> is <see langword="null"/>.
|
||||||
|
/// </exception>
|
||||||
|
/// <exception cref="ArgumentException">
|
||||||
|
/// <paramref name="address"/> isn't a local IP address.
|
||||||
|
/// </exception>
|
||||||
|
/// <exception cref="ArgumentOutOfRangeException">
|
||||||
|
/// <paramref name="port"/> isn't between 1 and 65535 inclusive.
|
||||||
|
/// </exception>
|
||||||
|
public HttpServer (System.Net.IPAddress address, int port)
|
||||||
|
: this (address, port, port == 443)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="HttpServer"/> class with
|
/// Initializes a new instance of the <see cref="HttpServer"/> class with
|
||||||
/// the specified <paramref name="address"/>, <paramref name="port"/>,
|
/// the specified <paramref name="address"/>, <paramref name="port"/>,
|
||||||
|
Loading…
Reference in New Issue
Block a user