WebSocketCloseAsync Method (CloseStatusCode) |
Namespace: Sfs2X.WebSocketSharp
public void CloseAsync( CloseStatusCode code )
One of the CloseStatusCode enum values.
It represents the status code indicating the reason for the close.
Exception | Condition |
---|---|
ArgumentException | code is ServerError. It cannot be used by clients. -or- code is MandatoryExtension. It cannot be used by servers. |
This method does not wait for the close to be complete.
This method does nothing if the current state of the connection is Closing or Closed.