C# Class HttpServer.HttpContext

Inheritance: IHttpContext, IDisposable
Afficher le fichier Open project: NyxStudios/HttpServer Class Usage Examples

Private Properties

Свойство Type Description
Close void
On100Continue void
OnConnectionTimeout void
OnReceive void
OnRequest void
ParseBuffer int
Start void

Méthodes publiques

Méthode Description
Disconnect ( ) : void

Disconnect context.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

HttpContext ( Socket socket, HttpServer.Messages.MessageFactoryContext context ) : System

Initializes a new instance of the HttpContext class.

Méthodes protégées

Méthode Description
CreateStream ( Socket socket ) : Stream

Create stream used to send and receive bytes from the socket.

Private Methods

Méthode Description
Close ( ) : void

Close and release socket.

On100Continue ( object sender, HttpServer.Messages.ContinueEventArgs e ) : void
OnConnectionTimeout ( object state ) : void
OnReceive ( IAsyncResult ar ) : void

Interpret incoming data.

OnRequest ( object sender, HttpServer.Messages.FactoryRequestEventArgs e ) : void

A request was received from the parser.

ParseBuffer ( int bytesLeft ) : int

Parse all complete requests in buffer.

Start ( ) : void

Start content.

Method Details

CreateStream() protected méthode

Create stream used to send and receive bytes from the socket.
Stream could not be created.
protected CreateStream ( Socket socket ) : Stream
socket Socket Socket to wrap
Résultat Stream

Disconnect() public méthode

Disconnect context.
public Disconnect ( ) : void
Résultat void

Dispose() public méthode

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Résultat void

HttpContext() public méthode

Initializes a new instance of the HttpContext class.
public HttpContext ( Socket socket, HttpServer.Messages.MessageFactoryContext context ) : System
socket Socket Socket received from HTTP listener.
context HttpServer.Messages.MessageFactoryContext Context used to parse incoming messages.
Résultat System