C# Класс WebStreams.Server.ControllerRouteExtensions

Extensions to ControllerRoute.
Показать файл Открыть проект

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

Метод Описание
HttpRequestHandler ( this route, object controller, string>.IDictionary args, IOwinContext environment, CancellationToken cancellationToken ) : Task

Returns a handler for incoming Web stream requests.

WebSocketRequestHandler ( this route, object controller, string>.IDictionary args ) : Func,Task>

Returns a handler for incoming Web stream requests.

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

Метод Описание
GetIdiomaticHttpRequestHandler ( ControllerRoute route, object controller, string>.IDictionary args ) : Task>.Func

Returns an HTTP request handler for single-return routes.

GetObservableFromHandler ( Func handler ) : IObservable

Returns an observable from the provided handler.

IncomingMessagePump ( WebSocket socket, SingleSubscriptionObservable>.IDictionary observableParams ) : Task

Pumps incoming messages from socket into their corresponding observables.

OutgoingMessagePump ( IObservable outgoing, WebSocket socket ) : Task

Subscribes to the provided outgoing stream, sending all events to the provided socket.

WriteChunkedMessage ( Stream stream, string message, CancellationToken token ) : Task

Writes message to stream and flushes the stream.

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

HttpRequestHandler() публичный статический Метод

Returns a handler for incoming Web stream requests.
public static HttpRequestHandler ( this route, object controller, string>.IDictionary args, IOwinContext environment, CancellationToken cancellationToken ) : Task
route this /// The handler. ///
controller object /// The controller. ///
args string>.IDictionary /// The request parameters. ///
environment IOwinContext /// The environment. ///
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task

WebSocketRequestHandler() публичный статический Метод

Returns a handler for incoming Web stream requests.
public static WebSocketRequestHandler ( this route, object controller, string>.IDictionary args ) : Func,Task>
route this /// The handler. ///
controller object /// The controller. ///
args string>.IDictionary /// The request parameters. ///
Результат Func,Task>