[Modify] Edit it
This commit is contained in:
parent
dfb8746cdf
commit
21b880dbcc
@ -2434,19 +2434,39 @@ namespace WebSocketSharp
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Closes the WebSocket connection with the specified <paramref name="code"/>,
|
/// Closes the connection with the specified <paramref name="code"/>.
|
||||||
/// and releases all associated resources.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This method does nothing if the current state of the connection is
|
/// This method does nothing if the current state of the connection is
|
||||||
/// Closing or Closed.
|
/// Closing or Closed.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="code">
|
/// <param name="code">
|
||||||
/// A <see cref="ushort"/> that represents the status code indicating
|
/// <para>
|
||||||
/// the reason for the close. The status codes are defined in
|
/// 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">
|
/// <see href="http://tools.ietf.org/html/rfc6455#section-7.4">
|
||||||
/// Section 7.4</see> of RFC 6455.
|
/// Section 7.4</see> of RFC 6455.
|
||||||
|
/// </para>
|
||||||
/// </param>
|
/// </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) and
|
||||||
|
/// it cannot be used by clients.
|
||||||
|
/// </para>
|
||||||
|
/// <para>
|
||||||
|
/// -or-
|
||||||
|
/// </para>
|
||||||
|
/// <para>
|
||||||
|
/// <paramref name="code"/> is 1010 (mandatory extension) and
|
||||||
|
/// it cannot be used by servers.
|
||||||
|
/// </para>
|
||||||
|
/// </exception>
|
||||||
public void Close (ushort code)
|
public void Close (ushort code)
|
||||||
{
|
{
|
||||||
if (!code.IsCloseStatusCode ()) {
|
if (!code.IsCloseStatusCode ()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user