WebSocket Constructor |
Namespace: Sfs2X.WebSocketSharp
public WebSocket( string url, params string[] protocols )
A String that specifies the URL to which to connect.
The scheme of the URL must be ws or wss.
The new instance uses a secure connection if the scheme is wss.
An array of String that specifies the names of the subprotocols if necessary.
Each value of the array must be a token defined in RFC 2616.
Exception | Condition |
---|---|
ArgumentNullException | url is . |
ArgumentException | url is an empty string. -or- url is an invalid WebSocket URL string. -or- protocols contains a value that is not a token. -or- protocols contains a value twice. |