C# Class Microsoft.AspNet.Server.Kestrel.Http.Frame

Inheritance: FrameContext, IFrameControl
Afficher le fichier Open project: Starcounter/KestrelHttpServer Class Usage Examples

Méthodes publiques

Méthode Description
BeginChunkBytes ( int dataCount ) : ArraySegment
Flush ( ) : void
FlushAsync ( CancellationToken cancellationToken ) : Task
Frame ( Microsoft.AspNet.Server.Kestrel.Http.ConnectionContext context ) : System
OnCompleted ( Task>.Func callback, object state ) : void
OnStarting ( Task>.Func callback, object state ) : void
ProduceContinue ( ) : void
ProduceStartAndFireOnStarting ( bool immediate = true ) : Task
RequestProcessingAsync ( ) : Task

Primary loop which consumes socket input, parses it for protocol framing, and invokes the application delegate for as long as the socket is intended to remain open. The resulting Task from this loop is preserved in a field which is used when the server needs to drain and close all currently active connections.

Reset ( ) : void
ResetResponseHeaders ( ) : void
Start ( ) : void

Called once by Connection class to begin the RequestProcessingAsync loop.

StatusCanHaveBody ( int statusCode ) : bool
Stop ( ) : Task

Should be called when the server wants to initiate a shutdown. The Task returned will become complete when the RequestProcessingAsync function has exited. It is expected that Stop will be called on all active connections, and Task.WaitAll() will be called on every return value.

TakeMessageHeaders ( SocketInput input, FrameRequestHeaders requestHeaders ) : bool
Write ( ArraySegment data ) : void
WriteAsync ( ArraySegment data, CancellationToken cancellationToken ) : Task

Private Methods

Méthode Description
CreateAsciiByteArraySegment ( string text ) : ArraySegment
CreateResponseHeader ( string status, bool appCompleted ) : IDisposable>.Tuple
FastEnumerable ( ) : object>>.IEnumerable
FastFeatureGet ( Type key ) : object
FastFeatureSet ( Type key, object feature ) : void
FastReset ( ) : void
FireOnCompleted ( ) : Task
FireOnStarting ( ) : Task
GetString ( ArraySegment range, int startIndex, int endIndex ) : string
ProduceEnd ( ) : Task
ProduceStart ( bool immediate, bool appCompleted ) : Task
ReportApplicationError ( Exception ex ) : void
TakeStartLine ( SocketInput input ) : bool
WriteChunked ( ArraySegment data ) : void
WriteChunkedAsync ( ArraySegment data, CancellationToken cancellationToken ) : Task
WriteChunkedResponseSuffix ( ) : void

Method Details

BeginChunkBytes() public static méthode

public static BeginChunkBytes ( int dataCount ) : ArraySegment
dataCount int
Résultat ArraySegment

Flush() public méthode

public Flush ( ) : void
Résultat void

FlushAsync() public méthode

public FlushAsync ( CancellationToken cancellationToken ) : Task
cancellationToken System.Threading.CancellationToken
Résultat Task

Frame() public méthode

public Frame ( Microsoft.AspNet.Server.Kestrel.Http.ConnectionContext context ) : System
context Microsoft.AspNet.Server.Kestrel.Http.ConnectionContext
Résultat System

OnCompleted() public méthode

public OnCompleted ( Task>.Func callback, object state ) : void
callback Task>.Func
state object
Résultat void

OnStarting() public méthode

public OnStarting ( Task>.Func callback, object state ) : void
callback Task>.Func
state object
Résultat void

ProduceContinue() public méthode

public ProduceContinue ( ) : void
Résultat void

ProduceStartAndFireOnStarting() public méthode

public ProduceStartAndFireOnStarting ( bool immediate = true ) : Task
immediate bool
Résultat Task

RequestProcessingAsync() public méthode

Primary loop which consumes socket input, parses it for protocol framing, and invokes the application delegate for as long as the socket is intended to remain open. The resulting Task from this loop is preserved in a field which is used when the server needs to drain and close all currently active connections.
public RequestProcessingAsync ( ) : Task
Résultat Task

Reset() public méthode

public Reset ( ) : void
Résultat void

ResetResponseHeaders() public méthode

public ResetResponseHeaders ( ) : void
Résultat void

Start() public méthode

Called once by Connection class to begin the RequestProcessingAsync loop.
public Start ( ) : void
Résultat void

StatusCanHaveBody() public méthode

public StatusCanHaveBody ( int statusCode ) : bool
statusCode int
Résultat bool

Stop() public méthode

Should be called when the server wants to initiate a shutdown. The Task returned will become complete when the RequestProcessingAsync function has exited. It is expected that Stop will be called on all active connections, and Task.WaitAll() will be called on every return value.
public Stop ( ) : Task
Résultat Task

TakeMessageHeaders() public static méthode

public static TakeMessageHeaders ( SocketInput input, FrameRequestHeaders requestHeaders ) : bool
input SocketInput
requestHeaders FrameRequestHeaders
Résultat bool

Write() public méthode

public Write ( ArraySegment data ) : void
data ArraySegment
Résultat void

WriteAsync() public méthode

public WriteAsync ( ArraySegment data, CancellationToken cancellationToken ) : Task
data ArraySegment
cancellationToken System.Threading.CancellationToken
Résultat Task