C# Class HttpServer.HttpContext

Inheritance: IHttpContext, IDisposable
Exibir arquivo Open project: NyxStudios/HttpServer Class Usage Examples

Private Properties

Property Type Description
Close void
On100Continue void
OnConnectionTimeout void
OnReceive void
OnRequest void
ParseBuffer int
Start void

Public Methods

Method 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.

Protected Methods

Method Description
CreateStream ( Socket socket ) : Stream

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

Private Methods

Method 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 method

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
return Stream

Disconnect() public method

Disconnect context.
public Disconnect ( ) : void
return void

Dispose() public method

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

HttpContext() public method

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.
return System