WebSocket..::..CloseAsync Method (CloseStatusCode, String)
Closes the WebSocket connection asynchronously with the specified
CloseStatusCode and String, and releases
all associated resources.
Namespace:
WebSocketSharpAssembly: C-DEngine (in C-DEngine.dll)
Syntax
public void CloseAsync( CloseStatusCode code, string reason )
Public Sub CloseAsync ( _ code As CloseStatusCode, _ reason As String _ )
public: void CloseAsync( CloseStatusCode^ code, String^ reason )
Parameters
- code
- Type: WebSocketSharp..::..CloseStatusCode
One of the CloseStatusCode enum values, represents the status code indicating the reason for the close.
Remarks
This method doesn't wait for the close to be complete.
This method emits a OnError event if the size of reason is greater than 123 bytes.