C-DEngine 5.105

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

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

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

Syntax


public void Close(
	ushort code,
	string reason
)
Public Sub Close ( _
	code As UShort, _
	reason As String _
)
public:
void Close(
	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 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.