C# Class Microsoft.AspNet.SignalR.Client.Connection

Inheritance: IConnection
Afficher le fichier Open project: SignalR/SignalR Class Usage Examples

Private Properties

Свойство Type Description
ChangeState bool
CreateQueryString string
CreateUserAgentString string
Disconnect void
IConnection bool
IConnection void
IConnection void
IConnection void
IConnection void
Negotiate Task
OnError void
OnMessageReceived void
OnReconnecting void
SetTimeout IDisposable
Start Task
StartTransport Task
Stop void
Stop void
TryParseVersion bool
VerifyProtocolVersion void

Méthodes publiques

Méthode Description
AddClientCertificate ( X509Certificate certificate ) : void

Adds a client certificate to the request

Connection ( string url ) : System

Initializes a new instance of the Connection class.

Connection ( string url, string>.IDictionary queryString ) : System

Initializes a new instance of the Connection class.

Connection ( string url, string queryString ) : System

Initializes a new instance of the Connection class.

Dispose ( ) : void

Stop the connection, equivalent to calling connection.stop

Send ( object value ) : Task

Sends an object that will be JSON serialized asynchronously over the connection.

Send ( string data ) : Task

Sends data asynchronously over the connection.

Start ( ) : Task

Starts the Connection.

Start ( IClientTransport transport ) : Task

Starts the Connection.

Stop ( ) : void

Stops the Connection and sends an abort message to the server.

Stop ( Exception error ) : void

Stops the Connection and sends an abort message to the server. The error due to which the connection is being stopped.

Trace ( TraceLevels level, string format ) : void

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Stop the connection, equivalent to calling connection.stop

OnClosed ( ) : void
OnSending ( ) : string

Private Methods

Méthode Description
ChangeState ( ConnectionState oldState, ConnectionState newState ) : bool
CreateQueryString ( string>.IDictionary queryString ) : string
CreateUserAgentString ( string client ) : string
Disconnect ( ) : void
IConnection ( ConnectionState oldState, ConnectionState newState ) : bool
IConnection ( ) : void

Stops the Connection without sending an abort message to the server. This function is called after we receive a disconnect message from the server.

IConnection ( Exception error ) : void
IConnection ( IRequest request ) : void
IConnection ( JToken message ) : void
Negotiate ( IClientTransport transport ) : Task
OnError ( Exception error ) : void
OnMessageReceived ( JToken message ) : void
OnReconnecting ( ) : void
SetTimeout ( System.TimeSpan delay, System.Action operation ) : IDisposable
Start ( IHttpClient httpClient ) : Task
StartTransport ( ) : Task
Stop ( Exception error, System.TimeSpan timeout ) : void
Stop ( System.TimeSpan timeout ) : void
TryParseVersion ( string versionString, Version &version ) : bool
VerifyProtocolVersion ( string versionString ) : void

Method Details

AddClientCertificate() public méthode

Adds a client certificate to the request
public AddClientCertificate ( X509Certificate certificate ) : void
certificate System.Security.Cryptography.X509Certificates.X509Certificate Client Certificate
Résultat void

Connection() public méthode

Initializes a new instance of the Connection class.
public Connection ( string url ) : System
url string The url to connect to.
Résultat System

Connection() public méthode

Initializes a new instance of the Connection class.
public Connection ( string url, string>.IDictionary queryString ) : System
url string The url to connect to.
queryString string>.IDictionary The query string data to pass to the server.
Résultat System

Connection() public méthode

Initializes a new instance of the Connection class.
public Connection ( string url, string queryString ) : System
url string The url to connect to.
queryString string The query string data to pass to the server.
Résultat System

Dispose() public méthode

Stop the connection, equivalent to calling connection.stop
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

Stop the connection, equivalent to calling connection.stop
protected Dispose ( bool disposing ) : void
disposing bool Set this to true to perform the dispose, false to do nothing
Résultat void

OnClosed() protected méthode

protected OnClosed ( ) : void
Résultat void

OnSending() protected méthode

protected OnSending ( ) : string
Résultat string

Send() public méthode

Sends an object that will be JSON serialized asynchronously over the connection.
public Send ( object value ) : Task
value object The value to serialize.
Résultat Task

Send() public méthode

Sends data asynchronously over the connection.
public Send ( string data ) : Task
data string The data to send.
Résultat Task

Start() public méthode

Starts the Connection.
public Start ( ) : Task
Résultat Task

Start() public méthode

Starts the Connection.
public Start ( IClientTransport transport ) : Task
transport IClientTransport The transport to use.
Résultat Task

Stop() public méthode

Stops the Connection and sends an abort message to the server.
public Stop ( ) : void
Résultat void

Stop() public méthode

Stops the Connection and sends an abort message to the server. The error due to which the connection is being stopped.
public Stop ( Exception error ) : void
error System.Exception
Résultat void

Trace() public méthode

public Trace ( TraceLevels level, string format ) : void
level TraceLevels
format string
Résultat void