[Modify] Edit it
This commit is contained in:
parent
9543252eb2
commit
17bc2aaab8
@ -2747,24 +2747,45 @@ namespace WebSocketSharp
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Closes the WebSocket connection asynchronously with the specified
|
||||
/// <paramref name="code"/>, and releases all associated resources.
|
||||
/// Closes the connection asynchronously with the specified
|
||||
/// <paramref name="code"/>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// This method does nothing if the current state of the connection is
|
||||
/// Closing or Closed.
|
||||
/// This method does not wait for the close to be complete.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// This method does not wait for the close to be complete.
|
||||
/// And this method does nothing if the current state of
|
||||
/// the connection is Closing or Closed.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
/// <param name="code">
|
||||
/// A <see cref="ushort"/> that represents the status code indicating
|
||||
/// the reason for the close. The status codes are defined in
|
||||
/// <para>
|
||||
/// A <see cref="ushort"/> that represents the status code
|
||||
/// indicating the reason for the close.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// The status codes are defined in
|
||||
/// <see href="http://tools.ietf.org/html/rfc6455#section-7.4">
|
||||
/// Section 7.4</see> of RFC 6455.
|
||||
/// </para>
|
||||
/// </param>
|
||||
/// <exception cref="ArgumentOutOfRangeException">
|
||||
/// <paramref name="code"/> is less than 1000 or greater than 4999.
|
||||
/// </exception>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// <para>
|
||||
/// <paramref name="code"/> is 1011 (server error).
|
||||
/// It cannot be used by clients.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// -or-
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <paramref name="code"/> is 1010 (mandatory extension).
|
||||
/// It cannot be used by servers.
|
||||
/// </para>
|
||||
/// </exception>
|
||||
public void CloseAsync (ushort code)
|
||||
{
|
||||
if (!code.IsCloseStatusCode ()) {
|
||||
|
Loading…
Reference in New Issue
Block a user