HttpServerStop Method (UInt16, String) |
Note: This API is now obsolete.
Namespace: Sfs2X.WebSocketSharp.Server
[ObsoleteAttribute("This method will be removed.")] public void Stop( ushort code, string reason )
A UInt16 that represents the status code indicating the reason for the WebSocket connection close.
The status codes are defined in Section 7.4 of RFC 6455.
A String that represents the reason for the WebSocket connection close.
The size must be 123 bytes or less in UTF-8.
Exception | Condition |
---|---|
ArgumentOutOfRangeException | code is less than 1000 or greater than 4999. -or- The size of reason is greater than 123 bytes. |
ArgumentException | code is 1010 (mandatory extension). -or- code is 1005 (no status) and there is reason. -or- reason could not be UTF-8-encoded. |