Replaced the AcceptWebSocket (string, Logger) method with the AcceptWebSocket (string) method

This commit is contained in:
sta 2015-02-05 17:31:33 +09:00
parent a1da1a8ada
commit 828e117190
2 changed files with 3 additions and 6 deletions

View File

@ -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

View File

@ -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;
} }