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)
|
private void close (CloseStatusCode code, string reason, bool wait)
|
||||||
{
|
{
|
||||||
close (
|
close (new PayloadData (((ushort) code).Append (reason)), !code.IsReserved (), wait);
|
||||||
new PayloadData (((ushort) code).Append (reason)), !code.IsReserved (), wait);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void close (PayloadData payload, bool send, bool wait)
|
private void close (PayloadData payload, bool send, bool wait)
|
||||||
@ -1773,17 +1772,6 @@ namespace WebSocketSharp
|
|||||||
null);
|
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>
|
/// <summary>
|
||||||
/// Sends a Ping using the WebSocket connection.
|
/// Sends a Ping using the WebSocket connection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -2125,5 +2113,20 @@ namespace WebSocketSharp
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#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