|
|
@ -3025,7 +3025,8 @@ namespace WebSocketSharp |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Closes the connection asynchronously with the specified code and reason.
|
|
|
|
/// Closes the connection asynchronously with the specified status code and
|
|
|
|
/// reason.
|
|
|
|
/// </summary>
|
|
|
|
/// <remarks>
|
|
|
|
/// <para>
|
|
|
@ -3055,17 +3056,6 @@ namespace WebSocketSharp |
|
|
|
/// Its size must be 123 bytes or less in UTF-8.
|
|
|
|
/// </para>
|
|
|
|
/// </param>
|
|
|
|
/// <exception cref="ArgumentOutOfRangeException">
|
|
|
|
/// <para>
|
|
|
|
/// <paramref name="code"/> is less than 1000 or greater than 4999.
|
|
|
|
/// </para>
|
|
|
|
/// <para>
|
|
|
|
/// -or-
|
|
|
|
/// </para>
|
|
|
|
/// <para>
|
|
|
|
/// The size of <paramref name="reason"/> is greater than 123 bytes.
|
|
|
|
/// </para>
|
|
|
|
/// </exception>
|
|
|
|
/// <exception cref="ArgumentException">
|
|
|
|
/// <para>
|
|
|
|
/// <paramref name="code"/> is 1011 (server error).
|
|
|
@ -3092,6 +3082,17 @@ namespace WebSocketSharp |
|
|
|
/// <paramref name="reason"/> could not be UTF-8-encoded.
|
|
|
|
/// </para>
|
|
|
|
/// </exception>
|
|
|
|
/// <exception cref="ArgumentOutOfRangeException">
|
|
|
|
/// <para>
|
|
|
|
/// <paramref name="code"/> is less than 1000 or greater than 4999.
|
|
|
|
/// </para>
|
|
|
|
/// <para>
|
|
|
|
/// -or-
|
|
|
|
/// </para>
|
|
|
|
/// <para>
|
|
|
|
/// The size of <paramref name="reason"/> is greater than 123 bytes.
|
|
|
|
/// </para>
|
|
|
|
/// </exception>
|
|
|
|
public void CloseAsync (ushort code, string reason) |
|
|
|
{ |
|
|
|
if (!code.IsCloseStatusCode ()) { |
|
|
|