Replaced the AcceptWebSocket (string, Logger) method with the AcceptWebSocket (string) method
This commit is contained in:
parent
a1da1a8ada
commit
828e117190
@ -178,9 +178,6 @@ namespace WebSocketSharp.Net
|
|||||||
/// <param name="protocol">
|
/// <param name="protocol">
|
||||||
/// A <see cref="string"/> that represents the subprotocol used in the WebSocket connection.
|
/// A <see cref="string"/> that represents the subprotocol used in the WebSocket connection.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <param name="logger">
|
|
||||||
/// A <see cref="Logger"/> that provides the logging functions used in the WebSocket attempts.
|
|
||||||
/// </param>
|
|
||||||
/// <exception cref="ArgumentException">
|
/// <exception cref="ArgumentException">
|
||||||
/// <para>
|
/// <para>
|
||||||
/// <paramref name="protocol"/> is empty.
|
/// <paramref name="protocol"/> is empty.
|
||||||
@ -192,7 +189,7 @@ namespace WebSocketSharp.Net
|
|||||||
/// <paramref name="protocol"/> contains an invalid character.
|
/// <paramref name="protocol"/> contains an invalid character.
|
||||||
/// </para>
|
/// </para>
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public HttpListenerWebSocketContext AcceptWebSocket (string protocol, Logger logger)
|
public HttpListenerWebSocketContext AcceptWebSocket (string protocol)
|
||||||
{
|
{
|
||||||
if (protocol != null) {
|
if (protocol != null) {
|
||||||
if (protocol.Length == 0)
|
if (protocol.Length == 0)
|
||||||
@ -202,7 +199,7 @@ namespace WebSocketSharp.Net
|
|||||||
throw new ArgumentException ("Contains an invalid character.", "protocol");
|
throw new ArgumentException ("Contains an invalid character.", "protocol");
|
||||||
}
|
}
|
||||||
|
|
||||||
return new HttpListenerWebSocketContext (this, protocol, logger ?? new Logger ());
|
return new HttpListenerWebSocketContext (this, protocol, _listener.Log);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -554,7 +554,7 @@ namespace WebSocketSharp.Server
|
|||||||
state => {
|
state => {
|
||||||
try {
|
try {
|
||||||
if (ctx.Request.IsUpgradeTo ("websocket")) {
|
if (ctx.Request.IsUpgradeTo ("websocket")) {
|
||||||
processRequest (ctx.AcceptWebSocket (null, _logger));
|
processRequest (ctx.AcceptWebSocket (null));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user