C# 클래스 Org.Mentalis.Proxy.Http.HttpClient

Relays HTTP data between a remote host and a local client.
This class supports both HTTP and HTTPS.
상속: Org.Mentalis.Proxy.Client
파일 보기 프로젝트 열기: mcorrientes/Web-Security-Toolset 1 사용 예제들

Private Properties

프로퍼티 타입 설명
IsValidQuery bool
OnConnected void
OnErrorSent void
OnOkSent void
OnQuerySent void
OnReceiveQuery void
ParseQuery System.Collections.Specialized.StringDictionary
ProcessQuery void
RebuildQuery string
SendBadRequest void

공개 메소드들

메소드 설명
HttpClient ( Socket ClientSocket, DestroyDelegate Destroyer ) : System

Initializes a new instance of the HttpClient class.

StartHandshake ( ) : void

Starts receiving data from the client connection.

ToString ( ) : string

Returns text information about this HttpClient object.

ToString ( bool WithUrl ) : string

Returns text information about this HttpClient object.

비공개 메소드들

메소드 설명
IsValidQuery ( string Query ) : bool

Checks whether a specified string is a valid HTTP query string.

OnConnected ( IAsyncResult ar ) : void

Called when we're connected to the requested remote host.

OnErrorSent ( IAsyncResult ar ) : void

Called when the Bad Request error has been sent to the client.

OnOkSent ( IAsyncResult ar ) : void

Called when an OK reply has been sent to the local client.

OnQuerySent ( IAsyncResult ar ) : void

Called when the HTTP query has been sent to the remote host.

OnReceiveQuery ( IAsyncResult ar ) : void

Called when we received some data from the client connection.

ParseQuery ( string Query ) : StringDictionary

Parses a specified HTTP query into its header fields.

ProcessQuery ( string Query ) : void

Processes a specified query and connects to the requested HTTP web server.

If there's an error while processing the HTTP request or when connecting to the remote server, the Proxy sends a "400 - Bad Request" error to the client.

RebuildQuery ( ) : string

Rebuilds the HTTP query, starting from the HttpRequestType, RequestedPath, HttpVersion and HeaderFields properties.

SendBadRequest ( ) : void

Sends a "400 - Bad Request" error to the client.

메소드 상세

HttpClient() 공개 메소드

Initializes a new instance of the HttpClient class.
public HttpClient ( Socket ClientSocket, DestroyDelegate Destroyer ) : System
ClientSocket Socket The Socket connection between this proxy server and the local client.
Destroyer DestroyDelegate The callback method to be called when this Client object disconnects from the local client and the remote server.
리턴 System

StartHandshake() 공개 메소드

Starts receiving data from the client connection.
public StartHandshake ( ) : void
리턴 void

ToString() 공개 메소드

Returns text information about this HttpClient object.
public ToString ( ) : string
리턴 string

ToString() 공개 메소드

Returns text information about this HttpClient object.
public ToString ( bool WithUrl ) : string
WithUrl bool Specifies whether or not to include information about the requested URL.
리턴 string