Implements the WebSocket interface.
See Also: Inherited members from object.
|
Initializes a new instance of the WebSocketSharp.WebSocket class with the specified WebSocket URL and subprotocols. | |
|
Initializes a new instance of the WebSocketSharp.WebSocket class with the specified WebSocket URL, OnOpen, OnMessage, OnError, OnClose event handlers and subprotocols. |
[read-only] | Extensions | string . Gets the extensions selected by the server. |
[read-only] | IsAlive | bool . Gets a value indicating whether a connection is alive. |
[read-only] | IsSecure | bool . Gets a value indicating whether a connection is secure. |
[read-only] | Protocol | string . Gets the subprotocol selected by the server. |
[read-only] | ReadyState | WsState . Gets the state of the connection. |
[read-only] | UnsentBuffer | byte[]. Gets the buffer that contains unsent WebSocket frames. |
[read-only] | UnsentCount | uint . Gets the count of unsent WebSocket frames. |
|
Url | Uri . Gets or sets the WebSocket URL. |
|
Close
()Closes the connection and releases all associated resources after sends a Close control frame. |
|
|
Close
(ushort)Closes the connection and releases all associated resources after sends a Close control frame. |
|
|
Close
(WebSocketSharp.Frame.CloseStatusCode)Closes the connection and releases all associated resources after sends a Close control frame. |
|
|
Close
(ushort, string)Closes the connection and releases all associated resources after sends a Close control frame. |
|
|
Close
(WebSocketSharp.Frame.CloseStatusCode, string)Closes the connection and releases all associated resources after sends a Close control frame. |
|
|
Connect
()Establishes a connection. |
|
|
Dispose
()Closes the connection and releases all associated resources after sends a Close control frame. |
|
|
Ping
()Sends a Ping frame using the connection. |
|
|
Ping
(string)Sends a Ping frame with a message using the connection. |
|
|
Send
(byte[])Sends a binary data using the connection. |
|
|
Send
(System.IO.FileInfo)Sends a binary data using the connection. |
|
|
Send
(string)Sends a text data using the connection. |
|
|
SendAsync
(byte[], Action)Sends a binary data asynchronously using the connection. |
|
|
SendAsync
(System.IO.FileInfo, Action)Sends a binary data asynchronously using the connection. |
|
|
SendAsync
(string, Action)Sends a text data asynchronously using the connection. |
Initializes a new instance of the WebSocketSharp.WebSocket class with the specified WebSocket URL and subprotocols.
Syntax
Parameters
Exceptions
Type Reason ArgumentNullException url is null. ArgumentException url is not valid WebSocket URL. Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Initializes a new instance of the WebSocketSharp.WebSocket class with the specified WebSocket URL, OnOpen, OnMessage, OnError, OnClose event handlers and subprotocols.
Syntax
public WebSocket (string url, EventHandler onOpen, EventHandler<MessageEventArgs> onMessage, EventHandler<ErrorEventArgs> onError, EventHandler<CloseEventArgs> onClose, params string[] protocols)Parameters
Exceptions
Type Reason ArgumentNullException url is null. ArgumentException url is not valid WebSocket URL. Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Closes the connection and releases all associated resources after sends a Close control frame.
Syntax
public void Close ()Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Closes the connection and releases all associated resources after sends a Close control frame.
Syntax
Parameters
- code
- A ushort that contains a status code indicating a reason for closure.
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Closes the connection and releases all associated resources after sends a Close control frame.
Syntax
public void Close (WebSocketSharp.Frame.CloseStatusCode code)Parameters
- code
- A WebSocketSharp.Frame.CloseStatusCode that contains a status code indicating a reason for closure.
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Closes the connection and releases all associated resources after sends a Close control frame.
Syntax
Parameters
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Closes the connection and releases all associated resources after sends a Close control frame.
Syntax
Parameters
- code
- A WebSocketSharp.Frame.CloseStatusCode that contains a status code indicating a reason for closure.
- reason
- A string that contains a reason for closure.
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Establishes a connection.
Syntax
public void Connect ()Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Closes the connection and releases all associated resources after sends a Close control frame.
Syntax
public void Dispose ()Remarks
Call WebSocket.Dispose when you are finished using the WebSocketSharp.WebSocket. The WebSocket.Dispose method leaves the WebSocketSharp.WebSocket in an unusable state. After calling WebSocket.Dispose, you must release all references to the WebSocketSharp.WebSocket so the garbage collector can reclaim the memory that the WebSocketSharp.WebSocket was occupying.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Gets the extensions selected by the server.
Syntax
public string Extensions { get; }Value
A string that contains the extensions if any. By default, String.Empty. (Currently this will only ever be the String.Empty.)Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Gets a value indicating whether a connection is alive.
Syntax
public bool IsAlive { get; }Value
true if the connection is alive; otherwise, false.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Gets a value indicating whether a connection is secure.
Syntax
public bool IsSecure { get; }Value
true if the connection is secure; otherwise, false.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Occurs when the WebSocket receives a Close frame or the Close method is called.
Syntax
public event EventHandler<CloseEventArgs> OnCloseRemarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Occurs when the WebSocket gets an error.
Syntax
public event EventHandler<ErrorEventArgs> OnErrorRemarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Occurs when the WebSocket receives a data frame.
Syntax
public event EventHandler<MessageEventArgs> OnMessageRemarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Occurs when the WebSocket connection has been established.
Syntax
public event EventHandler OnOpenRemarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Sends a Ping frame using the connection.
Syntax
public bool Ping ()Returns
true if the WebSocket receives a Pong frame in a time; otherwise, false.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Sends a Ping frame with a message using the connection.
Syntax
Parameters
- message
- A string that contains the message to be sent.
Returns
true if the WebSocket receives a Pong frame in a time; otherwise, false.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Gets the subprotocol selected by the server.
Syntax
public string Protocol { get; }Value
A string that contains the subprotocol if any. By default, String.Empty.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Gets the state of the connection.
Syntax
public WsState ReadyState { get; }Value
One of the WebSocketSharp.WsState. By default, WsState.CONNECTING.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Sends a binary data using the connection.
Syntax
Parameters
- data
- An array of byte that contains the binary data to be sent.
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Sends a binary data using the connection.
Syntax
public void Send (System.IO.FileInfo file)Parameters
- file
- A System.IO.FileInfo that contains the binary data to be sent.
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Sends a text data using the connection.
Syntax
Parameters
- data
- A string that contains the text data to be sent.
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Sends a binary data asynchronously using the connection.
Syntax
Parameters
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Sends a binary data asynchronously using the connection.
Syntax
Parameters
- file
- A System.IO.FileInfo that contains the binary data to be sent.
- completed
- An Action delegate that contains the method(s) that is called when an asynchronous operation completes.
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Sends a text data asynchronously using the connection.
Syntax
Parameters
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Gets the buffer that contains unsent WebSocket frames.
Syntax
public byte[] UnsentBuffer { get; }Value
An array of byte that contains unsent WebSocket frames.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Gets the count of unsent WebSocket frames.
Syntax
public uint UnsentCount { get; }Value
A uint that contains the count of unsent WebSocket frames.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581
Gets or sets the WebSocket URL.
Syntax
public Uri Url { get; set; }Value
A Uri that contains the WebSocket URL.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: WebSocketSharp
Assembly: websocket-sharp (in websocket-sharp.dll)
Assembly Versions: 1.0.2.36581