[Modify] Edit it

This commit is contained in:
sta 2017-07-27 17:25:37 +09:00
parent 5a91fbd318
commit 8cfe277d95

View File

@ -2635,21 +2635,61 @@ namespace WebSocketSharp
} }
/// <summary> /// <summary>
/// Closes the WebSocket connection with the specified <paramref name="code"/> and /// Closes the connection with the specified <paramref name="code"/> and
/// <paramref name="reason"/>, and releases all associated resources. /// <paramref name="reason"/>.
/// </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">
/// One of the <see cref="CloseStatusCode"/> enum values that represents /// <para>
/// the status code indicating the reason for the close. /// One of the <see cref="CloseStatusCode"/> enum values.
/// </para>
/// <para>
/// It represents the status code indicating the reason for the close.
/// </para>
/// </param> /// </param>
/// <param name="reason"> /// <param name="reason">
/// <para>
/// A <see cref="string"/> that represents the reason for the close. /// A <see cref="string"/> that represents the reason for the close.
/// The size must be 123 bytes or less. /// </para>
/// <para>
/// The size must be 123 bytes or less in UTF-8.
/// </para>
/// </param> /// </param>
/// <exception cref="ArgumentException">
/// <para>
/// <paramref name="code"/> is
/// <see cref="CloseStatusCode.ServerError"/>.
/// It cannot be used by clients.
/// </para>
/// <para>
/// -or-
/// </para>
/// <para>
/// <paramref name="code"/> is
/// <see cref="CloseStatusCode.MandatoryExtension"/>.
/// It cannot be used by servers.
/// </para>
/// <para>
/// -or-
/// </para>
/// <para>
/// <paramref name="code"/> is
/// <see cref="CloseStatusCode.NoStatus"/> and
/// there is <paramref name="reason"/>.
/// </para>
/// <para>
/// -or-
/// </para>
/// <para>
/// <paramref name="reason"/> could not be UTF-8-encoded.
/// </para>
/// </exception>
/// <exception cref="ArgumentOutOfRangeException">
/// The size of <paramref name="reason"/> is greater than 123 bytes.
/// </exception>
public void Close (CloseStatusCode code, string reason) public void Close (CloseStatusCode code, string reason)
{ {
if (_client && code == CloseStatusCode.ServerError) { if (_client && code == CloseStatusCode.ServerError) {