C# Класс SignalR.PersistentConnection

Наследование: HttpTaskAsyncHandler, IGroupManager
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
_ackHandler IAckHandler
_connectionIdPrefixGenerator IConnectionIdPrefixGenerator
_counters IPerformanceCounterWriter
_jsonSerializer IJsonSerializer
_newMessageBus IMessageBus
_trace ITraceManager
_transport ITransport

Private Properties

Свойство Тип Описание
GetTransport ITransport
IsNegotiationRequest bool
ProcessJsonpNegotiationRequest Task
ProcessNegotiationRequest Task

Открытые методы

Метод Описание
Initialize ( IDependencyResolver resolver ) : void
ProcessRequestAsync ( HostContext context ) : Task

Handles all requests for PersistentConnections.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
GetTransport ( SignalR.HostContext context ) : ITransport
IsNegotiationRequest ( IRequest request ) : bool
ProcessJsonpNegotiationRequest ( HostContext context, object payload ) : Task
ProcessNegotiationRequest ( HostContext context ) : Task

Описание методов

CreateConnection() защищенный Метод

protected CreateConnection ( string connectionId, IEnumerable signals, IEnumerable groups ) : Connection
connectionId string
signals IEnumerable
groups IEnumerable
Результат Connection

GetDefaultSignals() защищенный Метод

Returns the default signals for the PersistentConnection.
protected GetDefaultSignals ( string connectionId ) : IEnumerable
connectionId string The id of the incoming connection.
Результат IEnumerable

GetSignals() защищенный Метод

Returns the signals used in the PersistentConnection.
protected GetSignals ( string connectionId, IRequest request ) : IEnumerable
connectionId string The id of the incoming connection.
request IRequest
Результат IEnumerable

Initialize() публичный Метод

public Initialize ( IDependencyResolver resolver ) : void
resolver IDependencyResolver
Результат void

OnConnectedAsync() защищенный Метод

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.
Результат System.Threading.Tasks.Task

OnDisconnectAsync() защищенный Метод

Called when a connection disconnects.
protected OnDisconnectAsync ( string connectionId ) : System.Threading.Tasks.Task
connectionId string The id of the disconnected connection.
Результат System.Threading.Tasks.Task

OnReceivedAsync() защищенный Метод

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.
Результат System.Threading.Tasks.Task

OnReconnectedAsync() защищенный Метод

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.
Результат Task

OnRejoiningGroups() защищенный Метод

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.
Результат IEnumerable

ProcessRequestAsync() публичный Метод

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.
Результат Task

Описание свойств

_ackHandler защищенное свойство

protected IAckHandler _ackHandler
Результат IAckHandler

_connectionIdPrefixGenerator защищенное свойство

protected IConnectionIdPrefixGenerator _connectionIdPrefixGenerator
Результат IConnectionIdPrefixGenerator

_counters защищенное свойство

protected IPerformanceCounterWriter _counters
Результат IPerformanceCounterWriter

_jsonSerializer защищенное свойство

protected IJsonSerializer _jsonSerializer
Результат IJsonSerializer

_newMessageBus защищенное свойство

protected IMessageBus _newMessageBus
Результат IMessageBus

_trace защищенное свойство

protected ITraceManager _trace
Результат ITraceManager

_transport защищенное свойство

protected ITransport _transport
Результат ITransport