Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
.NET Framework 4
Provides client connections for SignalR services.
Inheritance Hierarchy
System.Object
  Microsoft.AspNet.SignalR.Client.Connection
    Microsoft.AspNet.SignalR.Client.Hubs.HubConnection
Namespace:  Microsoft.AspNet.SignalR.Client
Assembly:  Microsoft.AspNet.SignalR.Client (in Microsoft.AspNet.SignalR.Client.dll)
Syntax
'Declaration
Public Class Connection _
    Implements IConnection
'Usage
Dim instance As Connection
public class Connection : IConnection
public ref class Connection : IConnection
type Connection =  
    class 
        interface IConnection 
    end
public class Connection implements IConnection
The Connection type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| .jpeg) | Connection(String) | Initializes a new instance of the Connection class. | 
| .jpeg) | Connection(String, IDictionary<String, String>) | Initializes a new instance of the Connection class. | 
| .jpeg) | Connection(String, String) | Initializes a new instance of the Connection class. | 
Top
Properties
| Name | Description | |
|---|---|---|
| .jpeg) | ConnectionId | Gets or sets the connection id for the connection. | 
| .jpeg) | ConnectionToken | Gets or sets the connection token for the connection. | 
| .jpeg) | CookieContainer | Gets or sets the cookies associated with the connection. | 
| .jpeg) | Credentials | Gets or sets authentication information for the connection. | 
| .jpeg) | GroupsToken | Gets or sets the groups token for the connection. | 
| .jpeg) | Items | Gets a dictionary for storing state for the connection. | 
| .jpeg) | MessageId | Gets or sets the last message id for the connection. | 
| .jpeg) | Proxy | Gets of sets proxy information for the connection. | 
| .jpeg) | QueryString | Gets the query string specified in the constructor. | 
| .jpeg) | State | Gets the current ConnectionState of the connection. | 
| .jpeg) | Transport | |
| .jpeg) | Url | Gets the url for the connection. | 
Top
Methods
| Name | Description | |
|---|---|---|
| .jpeg) | Disconnect | Stops the Connection without sending an abort message to the server. | 
| .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 | |
| .jpeg) | OnSending | |
| .jpeg) | Send(Object) | Sends an object that will be JSON serialized asynchronously over the connection. | 
| .jpeg) | Send(String) | Sends data asynchronously over the connection. | 
| .jpeg) | Start() | Starts the Connection. | 
| .jpeg) | Start(IClientTransport) | Starts the Connection. | 
| .jpeg) | Start(IHttpClient) | Starts the Connection. | 
| .jpeg) | Stop | Stops the Connection and sends an abort message to the server. | 
| .jpeg) | ToString | (Inherited from Object.) | 
Top
Events
| Name | Description | |
|---|---|---|
| .jpeg) | Closed | Occurs when the Connection is stopped. | 
| .jpeg) | Error | Occurs when the Connection has encountered an error. | 
| .jpeg) | Received | Occurs when the Connection has received data from the server. | 
| .jpeg) | Reconnected | Occurs when the Connection successfully reconnects after a timeout. | 
| .jpeg) | Reconnecting | Occurs when the Connection starts reconnecting after an error. | 
| .jpeg) | StateChanged | Occurs when the Connection state changes. | 
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 | |
| .jpeg) .jpeg) | IConnection.OnError | |
| .jpeg) .jpeg) | IConnection.OnReceived | |
| .jpeg) .jpeg) | IConnection.OnReconnected | |
| .jpeg) .jpeg) | IConnection.OnReconnecting | |
| .jpeg) .jpeg) | IConnection.PrepareRequest | 
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.