Modified WebSocket.Dispose method to as IDisposable.Dispose method

This commit is contained in:
sta 2014-03-18 03:25:03 +09:00
parent c83621197e
commit 1c1666adad

View File

@ -716,8 +716,7 @@ namespace WebSocketSharp
private void close (CloseStatusCode code, string reason, bool wait)
{
close (
new PayloadData (((ushort) code).Append (reason)), !code.IsReserved (), wait);
close (new PayloadData (((ushort) code).Append (reason)), !code.IsReserved (), wait);
}
private void close (PayloadData payload, bool send, bool wait)
@ -1773,17 +1772,6 @@ namespace WebSocketSharp
null);
}
/// <summary>
/// Closes the WebSocket connection, and releases all associated resources.
/// </summary>
/// <remarks>
/// This method closes the WebSocket connection with <see cref="CloseStatusCode.Away"/>.
/// </remarks>
public void Dispose ()
{
Close (CloseStatusCode.Away, null);
}
/// <summary>
/// Sends a Ping using the WebSocket connection.
/// </summary>
@ -2125,5 +2113,20 @@ namespace WebSocketSharp
}
#endregion
#region Explicit Interface Implementation
/// <summary>
/// Closes the WebSocket connection, and releases all associated resources.
/// </summary>
/// <remarks>
/// This method closes the WebSocket connection with <see cref="CloseStatusCode.Away"/>.
/// </remarks>
void IDisposable.Dispose ()
{
Close (CloseStatusCode.Away, null);
}
#endregion
}
}