C-DEngine 5.105

WebSocket Constructor (String, array<String>[]()[][])

Initializes a new instance of the WebSocket class with the specified WebSocket URL and subprotocols.

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

Syntax


public WebSocket(
	string url,
	params string[] protocols
)
Public Sub New ( _
	url As String, _
	ParamArray protocols As String() _
)
public:
WebSocket(
	String^ url, 
	... array<String^>^ protocols
)

Parameters

url
Type: String
A String that represents the WebSocket URL to connect.
protocols
Type: array<String>[]()[][]
An array of String that contains the WebSocket subprotocols if any. Each value of protocols must be a token defined in RFC 2616.

Exceptions


ExceptionCondition
ArgumentNullExceptionurl is nullNothingnullptra null reference (Nothing in Visual Basic).
ArgumentException

url is invalid.

-or-

protocols is invalid.