WebSocketSessionManagerCloseSession Method (String, CloseStatusCode, String) |
Namespace: Sfs2X.WebSocketSharp.Server
public void CloseSession( string id, CloseStatusCode code, string reason )
One of the CloseStatusCode enum values.
It represents the status code indicating the reason for the close.
A String that represents the reason for the close.
The size must be 123 bytes or less in UTF-8.
| Exception | Condition |
|---|---|
| ArgumentNullException | id is . |
| ArgumentException | id is an empty string. -or- code is MandatoryExtension. -or- code is NoStatus and there is reason. -or- reason could not be UTF-8-encoded. |
| InvalidOperationException | The session could not be found. |
| ArgumentOutOfRangeException | The size of reason is greater than 123 bytes. |