C# 클래스 HttpServer.HttpContextFactory

Used to create and reuse contexts.
상속: IHttpContextFactory
파일 보기 프로젝트 열기: aurora-sim/Aurora-Libs 1 사용 예제들

공개 메소드들

메소드 설명
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.

보호된 메소드들

메소드 설명
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.

비공개 메소드들

메소드 설명
OnFreeContext ( object sender, HttpServer.DisconnectedEventArgs e ) : void
OnRequestReceived ( object sender, HttpServer.RequestEventArgs e ) : void

메소드 상세

CreateContext() 보호된 메소드

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
리턴 HttpClientContext

CreateContext() 공개 메소드

Creates a IHttpClientContext that handles a connected client.
public CreateContext ( Socket socket ) : IHttpClientContext
socket Socket Client socket (accepted by the ).
리턴 IHttpClientContext

CreateNewContext() 보호된 메소드

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
리턴 HttpClientContext

CreateSecureContext() 공개 메소드

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.
리턴 IHttpClientContext

HttpContextFactory() 공개 메소드

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.
리턴 System