C# Class SignalR.PersistentConnection

Inheritance: HttpTaskAsyncHandler, IGroupManager
Afficher le fichier Open project: Icenium/SignalR

Protected Properties

Свойство Type Description
_ackHandler IAckHandler
_connectionIdPrefixGenerator IConnectionIdPrefixGenerator
_counters IPerformanceCounterWriter
_jsonSerializer IJsonSerializer
_newMessageBus IMessageBus
_trace ITraceManager
_transport ITransport

Private Properties

Свойство Type Description
GetTransport ITransport
IsNegotiationRequest bool
ProcessJsonpNegotiationRequest Task
ProcessNegotiationRequest Task

Méthodes publiques

Méthode Description
Initialize ( IDependencyResolver resolver ) : void
ProcessRequestAsync ( HostContext context ) : Task

Handles all requests for PersistentConnections.

Méthodes protégées

Méthode Description
CreateConnection ( string connectionId, IEnumerable signals, IEnumerable groups ) : Connection
GetDefaultSignals ( string connectionId ) : IEnumerable

Returns the default signals for the PersistentConnection.

GetSignals ( string connectionId, IRequest request ) : IEnumerable

Returns the signals used in the PersistentConnection.

OnConnectedAsync ( IRequest request, string connectionId ) : System.Threading.Tasks.Task

Called when a new connection is made.

OnDisconnectAsync ( string connectionId ) : System.Threading.Tasks.Task

Called when a connection disconnects.

OnReceivedAsync ( IRequest request, string connectionId, string data ) : System.Threading.Tasks.Task

Called when data is received from a connection.

OnReconnectedAsync ( IRequest request, IEnumerable groups, string connectionId ) : Task

Called when a connection reconnects after a timeout.

OnRejoiningGroups ( IRequest request, IEnumerable groups, string connectionId ) : IEnumerable

Called when a connection reconnects after a timeout to determine which groups should be rejoined.

Private Methods

Méthode Description
GetTransport ( SignalR.HostContext context ) : ITransport
IsNegotiationRequest ( IRequest request ) : bool
ProcessJsonpNegotiationRequest ( HostContext context, object payload ) : Task
ProcessNegotiationRequest ( HostContext context ) : Task

Method Details

CreateConnection() protected méthode

protected CreateConnection ( string connectionId, IEnumerable signals, IEnumerable groups ) : Connection
connectionId string
signals IEnumerable
groups IEnumerable
Résultat Connection

GetDefaultSignals() protected méthode

Returns the default signals for the PersistentConnection.
protected GetDefaultSignals ( string connectionId ) : IEnumerable
connectionId string The id of the incoming connection.
Résultat IEnumerable

GetSignals() protected méthode

Returns the signals used in the PersistentConnection.
protected GetSignals ( string connectionId, IRequest request ) : IEnumerable
connectionId string The id of the incoming connection.
request IRequest
Résultat IEnumerable

Initialize() public méthode

public Initialize ( IDependencyResolver resolver ) : void
resolver IDependencyResolver
Résultat void

OnConnectedAsync() protected méthode

Called when a new connection is made.
protected OnConnectedAsync ( IRequest request, string connectionId ) : System.Threading.Tasks.Task
request IRequest The for the current connection.
connectionId string The id of the connecting client.
Résultat System.Threading.Tasks.Task

OnDisconnectAsync() protected méthode

Called when a connection disconnects.
protected OnDisconnectAsync ( string connectionId ) : System.Threading.Tasks.Task
connectionId string The id of the disconnected connection.
Résultat System.Threading.Tasks.Task

OnReceivedAsync() protected méthode

Called when data is received from a connection.
protected OnReceivedAsync ( IRequest request, string connectionId, string data ) : System.Threading.Tasks.Task
request IRequest The for the current connection.
connectionId string The id of the connection sending the data.
data string The payload sent to the connection.
Résultat System.Threading.Tasks.Task

OnReconnectedAsync() protected méthode

Called when a connection reconnects after a timeout.
protected OnReconnectedAsync ( IRequest request, IEnumerable groups, string connectionId ) : Task
request IRequest The for the current connection.
groups IEnumerable The groups the calling connection is a part of.
connectionId string The id of the re-connecting client.
Résultat Task

OnRejoiningGroups() protected méthode

Called when a connection reconnects after a timeout to determine which groups should be rejoined.
protected OnRejoiningGroups ( IRequest request, IEnumerable groups, string connectionId ) : IEnumerable
request IRequest The for the current connection.
groups IEnumerable The groups the calling connection claims to be part of.
connectionId string The id of the reconnecting client.
Résultat IEnumerable

ProcessRequestAsync() public méthode

Handles all requests for PersistentConnections.
/// Thrown if connection wasn't initialized. /// Thrown if the transport wasn't specified. /// Thrown if the connection id wasn't specified. ///
public ProcessRequestAsync ( HostContext context ) : Task
context HostContext The for the current request.
Résultat Task

Property Details

_ackHandler protected_oe property

protected IAckHandler _ackHandler
Résultat IAckHandler

_connectionIdPrefixGenerator protected_oe property

protected IConnectionIdPrefixGenerator _connectionIdPrefixGenerator
Résultat IConnectionIdPrefixGenerator

_counters protected_oe property

protected IPerformanceCounterWriter _counters
Résultat IPerformanceCounterWriter

_jsonSerializer protected_oe property

protected IJsonSerializer _jsonSerializer
Résultat IJsonSerializer

_newMessageBus protected_oe property

protected IMessageBus _newMessageBus
Résultat IMessageBus

_trace protected_oe property

protected ITraceManager _trace
Résultat ITraceManager

_transport protected_oe property

protected ITransport _transport
Résultat ITransport