WebSocketClient Class
Namespace: Rebex.Net
Assembly: Rebex.WebSocket.dll (version 7.0.9147)
WebSocket client API.
Syntax
public class WebSocketClient : NetworkSession, ILogWriterProvider, IDisposable
Inherited Members
Constructors
Name | Description |
---|---|
Web |
Creates a new instance of Web |
Properties
Name | Description |
---|---|
Close |
Gets the close status (only available once the WebSocket has been closed). |
Close |
Gets the close status description (only available once the WebSocket has been closed). |
Default |
Gets or sets a default log writer used by all new instances of Network |
Http |
Gets or sets the HTTP response headers or null if not available. |
Http |
Gets the HTTP response status code or zero if not available. |
Instance |
Gets instance ID (intended for logging purposes).
Inherited from Network |
Is |
Gets a value indicating whether the session is authenticated.
Inherited from Network |
Is |
Gets a value indicating whether the session is connected.
Inherited from Network |
Log |
Gets or sets the Log |
Options | WebSocket options. |
Proxy | Gets or sets the network proxy to use to access a remote server. |
Server |
Gets the server name, if available.
Inherited from Network |
Server |
Gets the server port, if available.
Inherited from Network |
Settings | Gets an Web |
State | Gets the last known state of the WebSocket object. |
Sub |
Gets the sub-protocol selected by the server (only available once the WebSocket has been connected). |
User |
Gets the authenticated user name, if available.
Inherited from Network |
Methods
Name | Description |
---|---|
Abort() | Aborts the WebSocket and all active operations. |
Close() | Closes the sending part of the WebSocket (unless already closed) and waits for the receiving part to be closed. |
Close(Web |
Closes the sending part of the WebSocket (unless already closed) and waits for the receiving part to be closed. |
Close |
Closes the sending part of the WebSocket (unless already closed) and waits for the receiving part to be closed. |
Close |
Closes the sending part of the WebSocket, making it possible to still receive messages from the server. |
Close |
Closes the sending part of the WebSocket, making it possible to still receive messages from the server. |
Connect(String) | Establish a WebSocket connection to the specified URL. |
Connect(Uri) | Establish a WebSocket connection to the specified URL. |
Connect |
Establish a WebSocket connection to the specified URL. |
Connect |
Establish a WebSocket connection to the specified URL. |
Dispose() | Disposes the Web |
Get |
Gets hash code for this object.
Inherited from Network |
Poll(Int32) | Wait until a message fragment is received or the specified timeout has elapsed. |
Receive(ArraySegment<Byte>) | Receives a message fragment from the server. |
Receive<T>() | Receives a message of the specified type from the server. Only String, byte array and Object types are currently supported. |
ReceiveAsync(ArraySegment<Byte>, CancellationToken) | Receives a message fragment from the server. |
ReceiveAsync<T>(CancellationToken) | Receives a message of the specified type from the server. Only String, byte array and Object types are currently supported. |
Send(ArraySegment<Byte>, WebSocketMessageType, WebSocketMessageFlags) | Sends the specified message fragment to the server. |
Send(ArraySegment<Byte>, WebSocketMessageType, Boolean) | Sends the specified message fragment to the server. |
Send(Byte[]) | Sends the specified binary message to the server. |
Send(String) | Sends the specified text message to the server. |
SendAsync(ArraySegment<Byte>, WebSocketMessageType, WebSocketMessageFlags, CancellationToken) | Sends the specified message fragment to the server. |
SendAsync(ArraySegment<Byte>, WebSocketMessageType, Boolean, CancellationToken) | Sends the specified message fragment to the server. |
Send |
Sends the specified binary message to the server. |
Send |
Sends the specified text message to the server. |
Set |
Sets the socket factory to be used to create communication sockets. |
Events
Name | Description |
---|---|
Validating |
Occurs when a server certificate needs to be validated. |