C-DEngine 5.105

WebSocket..::..CloseAsync Method (UInt16, String)

Closes the WebSocket connection asynchronously with the specified UInt16 and String, and releases all associated resources.

Namespace:  WebSocketSharp
Assembly:  C-DEngine (in C-DEngine.dll)

Syntax


public void CloseAsync(
	ushort code,
	string reason
)
Public Sub CloseAsync ( _
	code As UShort, _
	reason As String _
)
public:
void CloseAsync(
	unsigned short^ code, 
	String^ reason
)

Parameters

code
Type: UInt16
A UInt16 that represents the status code indicating the reason for the close.
reason
Type: String
A String that represents the reason for the close.

Remarks


This method doesn't wait for the close to be complete.

This method emits a OnError event if code isn't in the allowable range of the close status code or the size of reason is greater than 123 bytes.