Modified WebSocket.Dispose method to as IDisposable.Dispose method
This commit is contained in:
parent
c83621197e
commit
1c1666adad
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user