.NET Framework 4
A Connection for interacting with Hubs.
Inheritance Hierarchy
System.Object
  Microsoft.AspNet.SignalR.Client.Connection
    Microsoft.AspNet.SignalR.Client.Hubs.HubConnection
Namespace:  Microsoft.AspNet.SignalR.Client.Hubs
Assembly:  Microsoft.AspNet.SignalR.Client (in Microsoft.AspNet.SignalR.Client.dll)
Syntax
'Declaration
Public Class HubConnection _
    Inherits Connection _
    Implements IHubConnection, IConnection
'Usage
Dim instance As HubConnection
public class HubConnection : Connection, 
    IHubConnection, IConnection
public ref class HubConnection : public Connection, 
    IHubConnection, IConnection
type HubConnection =  
    class 
        inherit Connection 
        interface IHubConnection 
        interface IConnection 
    end
public class HubConnection extends Connection implements IHubConnection, IConnection
The HubConnection type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| .jpeg) | HubConnection(String) | Initializes a new instance of the HubConnection class. | 
| .jpeg) | HubConnection(String, Boolean) | Initializes a new instance of the HubConnection class. | 
| .jpeg) | HubConnection(String, IDictionary<String, String>) | Initializes a new instance of the HubConnection class. | 
| .jpeg) | HubConnection(String, String) | Initializes a new instance of the HubConnection class. | 
| .jpeg) | HubConnection(String, IDictionary<String, String>, Boolean) | Initializes a new instance of the HubConnection class. | 
| .jpeg) | HubConnection(String, String, Boolean) | Initializes a new instance of the HubConnection class. | 
Top
Properties
| Name | Description | |
|---|---|---|
| .jpeg) | ConnectionId | Gets or sets the connection id for the connection. (Inherited from Connection.) | 
| .jpeg) | ConnectionToken | Gets or sets the connection token for the connection. (Inherited from Connection.) | 
| .jpeg) | CookieContainer | Gets or sets the cookies associated with the connection. (Inherited from Connection.) | 
| .jpeg) | Credentials | Gets or sets authentication information for the connection. (Inherited from Connection.) | 
| .jpeg) | GroupsToken | Gets or sets the groups token for the connection. (Inherited from Connection.) | 
| .jpeg) | Items | Gets a dictionary for storing state for the connection. (Inherited from Connection.) | 
| .jpeg) | MessageId | Gets or sets the last message id for the connection. (Inherited from Connection.) | 
| .jpeg) | Proxy | Gets of sets proxy information for the connection. (Inherited from Connection.) | 
| .jpeg) | QueryString | Gets the query string specified in the constructor. (Inherited from Connection.) | 
| .jpeg) | State | Gets the current ConnectionState of the connection. (Inherited from Connection.) | 
| .jpeg) | Transport | (Inherited from Connection.) | 
| .jpeg) | Url | Gets the url for the connection. (Inherited from Connection.) | 
Top
Methods
| Name | Description | |
|---|---|---|
| .jpeg) | CreateHubProxy | Creates an IHubProxy for the hub with the specified name. | 
| .jpeg) | Disconnect | Stops the Connection without sending an abort message to the server. (Inherited from Connection.) | 
| .jpeg) | Equals | (Inherited from Object.) | 
| .jpeg) | Finalize | (Inherited from Object.) | 
| .jpeg) | GetHashCode | (Inherited from Object.) | 
| .jpeg) | GetType | (Inherited from Object.) | 
| .jpeg) | MemberwiseClone | (Inherited from Object.) | 
| .jpeg) | OnMessageReceived | (Overrides Connection.OnMessageReceived(JToken).) | 
| .jpeg) | OnSending | (Overrides Connection.OnSending().) | 
| .jpeg) | RegisterCallback | |
| .jpeg) | Send(Object) | Sends an object that will be JSON serialized asynchronously over the connection. (Inherited from Connection.) | 
| .jpeg) | Send(String) | Sends data asynchronously over the connection. (Inherited from Connection.) | 
| .jpeg) | Start() | Starts the Connection. (Inherited from Connection.) | 
| .jpeg) | Start(IClientTransport) | Starts the Connection. (Inherited from Connection.) | 
| .jpeg) | Start(IHttpClient) | Starts the Connection. (Inherited from Connection.) | 
| .jpeg) | Stop | Stops the Connection and sends an abort message to the server. (Inherited from Connection.) | 
| .jpeg) | ToString | (Inherited from Object.) | 
Top
Events
| Name | Description | |
|---|---|---|
| .jpeg) | Closed | Occurs when the Connection is stopped. (Inherited from Connection.) | 
| .jpeg) | Error | Occurs when the Connection has encountered an error. (Inherited from Connection.) | 
| .jpeg) | Received | Occurs when the Connection has received data from the server. (Inherited from Connection.) | 
| .jpeg) | Reconnected | Occurs when the Connection successfully reconnects after a timeout. (Inherited from Connection.) | 
| .jpeg) | Reconnecting | Occurs when the Connection starts reconnecting after an error. (Inherited from Connection.) | 
| .jpeg) | StateChanged | Occurs when the Connection state changes. (Inherited from Connection.) | 
Top
Extension Methods
| Name | Description | |
|---|---|---|
| .gif) | AsObservable() | Overloaded. (Defined by ConnectionExtensions.) | 
| .gif) | AsObservable<T>() | Overloaded. (Defined by ConnectionExtensions.) | 
| .gif) | AsObservable<T>(Func<String, T>) | Overloaded. (Defined by ConnectionExtensions.) | 
| .gif) | EnsureReconnecting | (Defined by ConnectionExtensions.) | 
| .gif) | GetValue<T> | (Defined by ConnectionExtensions.) | 
Top
Explicit Interface Implementations
| Name | Description | |
|---|---|---|
| .jpeg) .jpeg) | IConnection.ChangeState | (Inherited from Connection.) | 
| .jpeg) .jpeg) | IConnection.OnError | (Inherited from Connection.) | 
| .jpeg) .jpeg) | IConnection.OnReceived | (Inherited from Connection.) | 
| .jpeg) .jpeg) | IConnection.OnReconnected | (Inherited from Connection.) | 
| .jpeg) .jpeg) | IConnection.OnReconnecting | (Inherited from Connection.) | 
| .jpeg) .jpeg) | IConnection.PrepareRequest | (Inherited from Connection.) | 
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.