C# Class HttpServer.HttpContextFactory

Used to create and reuse contexts.
Inheritance: IHttpContextFactory
Afficher le fichier Open project: aurora-sim/Aurora-Libs Class Usage Examples

Méthodes publiques

Méthode Description
CreateContext ( Socket socket ) : IHttpClientContext

Creates a IHttpClientContext that handles a connected client.

CreateSecureContext ( Socket socket, X509Certificate certificate, SslProtocols protocol ) : IHttpClientContext

Create a secure IHttpClientContext.

HttpContextFactory ( ILogWriter writer, int bufferSize, IRequestParserFactory factory ) : System

Initializes a new instance of the HttpContextFactory class.

Méthodes protégées

Méthode Description
CreateContext ( bool isSecured, IPEndPoint endPoint, Stream stream, Socket sock ) : HttpClientContext

Create a new context.

CreateNewContext ( bool isSecured, IPEndPoint endPoint, Stream stream, Socket sock ) : HttpClientContext

Create a new context.

Private Methods

Méthode Description
OnFreeContext ( object sender, HttpServer.DisconnectedEventArgs e ) : void
OnRequestReceived ( object sender, HttpServer.RequestEventArgs e ) : void

Method Details

CreateContext() protected méthode

Create a new context.
protected CreateContext ( bool isSecured, IPEndPoint endPoint, Stream stream, Socket sock ) : HttpClientContext
isSecured bool true if socket is running HTTPS.
endPoint System.Net.IPEndPoint Client that connected
stream Stream Network/SSL stream.
sock Socket
Résultat HttpClientContext

CreateContext() public méthode

Creates a IHttpClientContext that handles a connected client.
public CreateContext ( Socket socket ) : IHttpClientContext
socket Socket Client socket (accepted by the ).
Résultat IHttpClientContext

CreateNewContext() protected méthode

Create a new context.
protected CreateNewContext ( bool isSecured, IPEndPoint endPoint, Stream stream, Socket sock ) : HttpClientContext
isSecured bool true if HTTPS is used.
endPoint System.Net.IPEndPoint Remote client
stream Stream Network stream, uses .
sock Socket
Résultat HttpClientContext

CreateSecureContext() public méthode

Create a secure IHttpClientContext.
public CreateSecureContext ( Socket socket, X509Certificate certificate, SslProtocols protocol ) : IHttpClientContext
socket Socket Client socket (accepted by the ).
certificate System.Security.Cryptography.X509Certificates.X509Certificate HTTPS certificate to use.
protocol SslProtocols Kind of HTTPS protocol. Usually TLS or SSL.
Résultat IHttpClientContext

HttpContextFactory() public méthode

Initializes a new instance of the HttpContextFactory class.
public HttpContextFactory ( ILogWriter writer, int bufferSize, IRequestParserFactory factory ) : System
writer ILogWriter The writer.
bufferSize int Amount of bytes to read from the incoming socket stream.
factory IRequestParserFactory Used to create a request parser.
Résultat System