Click or drag to resize

WebSocketClose Method (CloseStatusCode)

Closes the connection with the specified code.

Namespace:  Sfs2X.WebSocketSharp
Assembly:  SmartFox2X (in SmartFox2X.dll) Version: 1.8.0.0 (1.8.0)
Syntax
C#
public void Close(
	CloseStatusCode code
)

Parameters

code
Type: Sfs2X.WebSocketSharpCloseStatusCode

One of the CloseStatusCode enum values.

It represents the status code indicating the reason for the close.

Exceptions
ExceptionCondition
ArgumentException

code is ServerError. It cannot be used by clients.

-or-

code is MandatoryExtension. It cannot be used by servers.

Remarks
This method does nothing if the current state of the connection is Closing or Closed.
See Also