C-DEngine 5.105

WebSocket..::..Close Method (CloseStatusCode, String)

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

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

Syntax


public void Close(
	CloseStatusCode code,
	string reason
)
Public Sub Close ( _
	code As CloseStatusCode, _
	reason As String _
)
public:
void Close(
	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.
reason
Type: String
A String that represents the reason for the close.

Remarks


This method emits a OnError event if the size of reason is greater than 123 bytes.