websocket-sharp
System.Object
System.IDisposable
Implements the WebSocket interface.
The WebSocket class provides a set of methods and properties for two-way communication
using the WebSocket protocol (RFC 6455).
Constructor
System.ParamArray
A that contains a WebSocket URL to connect.
An array of that contains the WebSocket subprotocols if any.
Initializes a new instance of the class with the specified WebSocket URL and subprotocols.
is .
is not valid WebSocket URL.
Constructor
System.ParamArray
A that contains a WebSocket URL to connect.
An event handler.
An event handler.
An event handler.
An event handler.
An array of that contains the WebSocket subprotocols if any.
Initializes a new instance of the class with the specified WebSocket URL,
OnOpen, OnMessage, OnError, OnClose event handlers and subprotocols.
This constructor initializes a new instance of the class and
establishes a WebSocket connection.
is .
is not valid WebSocket URL.
Method
System.Void
Closes the WebSocket connection and releases all associated resources.
To be added.
Method
System.Void
A that indicates the status code for closure.
Closes the WebSocket connection with the specified and
releases all associated resources.
This Close method emits a event if is not
in the allowable range of the WebSocket close status code.
Method
System.Void
One of the values that indicates the status code for closure.
Closes the WebSocket connection with the specified and
releases all associated resources.
To be added.
Method
System.Void
A that indicates the status code for closure.
A that contains the reason for closure.
Closes the WebSocket connection with the specified and
, and releases all associated resources.
This Close method emits a event if is not
in the allowable range of the WebSocket close status code.
Method
System.Void
One of the values that indicates the status code for closure.
A that contains the reason for closure.
Closes the WebSocket connection with the specified and
, and releases all associated resources.
To be added.
Property
WebSocketSharp.CompressionMethod
Gets or sets the compression method used to compress the payload data of the WebSocket Data frame.
One of the values that indicates the compression method to use.
The default is .
To be added.
Method
System.Void
Establishes a WebSocket connection.
To be added.
Property
System.Collections.Generic.IEnumerable<WebSocketSharp.Net.Cookie>
Gets the cookies used in the WebSocket opening handshake.
An IEnumerable<Cookie> interface that provides an enumerator which supports the iteration
over the collection of cookies.
To be added.
Property
WebSocketSharp.WsCredential
Gets the credentials for HTTP authentication (Basic/Digest).
A that contains the credentials for HTTP authentication.
To be added.
Method
System.Void
Closes the WebSocket connection and releases all associated resources.
This method closes the WebSocket connection with the .
Property
System.String
Gets the WebSocket extensions selected by the server.
A that contains the extensions if any. The default is .
To be added.
Property
System.Boolean
Gets a value indicating whether the WebSocket connection is alive.
true if the WebSocket connection is alive; otherwise, false.
To be added.
Property
System.Boolean
Gets a value indicating whether the WebSocket connection is secure.
true if the connection is secure; otherwise, false.
To be added.
Event
System.EventHandler<WebSocketSharp.CloseEventArgs>
Occurs when the receives a Close frame or the Close method is called.
To be added.
Event
System.EventHandler<WebSocketSharp.ErrorEventArgs>
Occurs when the gets an error.
To be added.
Event
System.EventHandler<WebSocketSharp.MessageEventArgs>
Occurs when the receives a data frame.
To be added.
Event
System.EventHandler
Occurs when the WebSocket connection has been established.
To be added.
Property
System.String
Gets or sets the value of the Origin header used in the WebSocket opening handshake.
A that contains the value of the HTTP Origin header to send.
The default is .
The value of the Origin header has the following syntax: <scheme>://<host>[:<port>]
A instance does not send the Origin header in the WebSocket opening handshake
if the value of this property is .
Method
System.Boolean
Sends a Ping using the WebSocket connection.
true if a instance receives a Pong in a time; otherwise, false.
To be added.
Method
System.Boolean
A that contains a message to send with a Ping.
Sends a Ping with the specified using the WebSocket connection.
true if a instance receives a Pong in a time; otherwise, false.
To be added.
Property
System.String
Gets the WebSocket subprotocol selected by the server.
A that contains the subprotocol if any. The default is .
To be added.
Property
WebSocketSharp.WsState
Gets the state of the WebSocket connection.
One of the values. The default is .
To be added.
Method
System.Void
An array of that contains a binary data to send.
Sends a binary using the WebSocket connection.
To be added.
Method
System.Void
A that contains a binary data to send.
Sends a binary data using the WebSocket connection.
To be added.
Method
System.Void
A that contains a text data to send.
Sends a text using the WebSocket connection.
To be added.
Method
System.Void
An array of that contains a binary data to send.
An delegate that references the method(s) called when
the asynchronous operation completes.
Sends a binary asynchronously using the WebSocket connection.
To be added.
Method
System.Void
A that contains a binary data to send.
An delegate that references the method(s) called when
the asynchronous operation completes.
Sends a binary data asynchronously using the WebSocket connection.
To be added.
Method
System.Void
A that contains a text data to send.
An delegate that references the method(s) called when
the asynchronous operation completes.
Sends a text asynchronously using the WebSocket connection.
To be added.
Method
System.Void
A that contains an HTTP Cookie to set.
Sets a used in the WebSocket opening handshake.
To be added.
Method
System.Void
A that contains a user name associated with the credentials.
A that contains a password for associated with the credentials.
true if sends the credentials as a Basic authorization with the first request handshake;
otherwise, false.
Sets the credentials for HTTP authentication (Basic/Digest).
To be added.
Property
System.Uri
Gets the WebSocket URL to connect.
A that contains the WebSocket URL to connect.
To be added.