C# Класс TrotiNet.ProxyLogic

Wrapper around BaseProxyLogic that adds various utility functions
Наследование: BaseProxyLogic
Показать файл Открыть проект

Открытые методы

Метод Описание
ChangeRequestURI ( string newURI ) : void

Change the request URI; also change the 'Host' request header, when necessary

If required, this function should be called from OnReceiveRequest.

CompressResponse ( byte output ) : byte[]

Compress a byte array based on the content encoding header

CreateProxy ( HttpSocket socketBP ) : AbstractProxyLogic

Static constructor

EncodeStringResponse ( string s, Encoding encoding ) : byte[]

Get an encoded byte array for a given string

GetResponseMessageStream ( Stream inS ) : Stream

Interpret a message with respect to its content encoding

GetResponseMessageStream ( byte msg ) : Stream

Interpret a message with respect to its content encoding

ProxyLogic ( HttpSocket socketBP ) : System

Instantiate a transparent proxy

Защищенные методы

Метод Описание
GetContent ( ) : byte[]

If this method is called on a response, either the custom response pipeline or the 302 redirect MUST be used.

Приватные методы

Метод Описание
GetChunkedContent ( ) : byte[]

Download the chunked file and return the byte array

GetNonChunkedContent ( ) : byte[]

Get a file with a known file size (i.e., not chunked).

Описание методов

ChangeRequestURI() публичный Метод

Change the request URI; also change the 'Host' request header, when necessary
If required, this function should be called from OnReceiveRequest.
public ChangeRequestURI ( string newURI ) : void
newURI string
Результат void

CompressResponse() публичный Метод

Compress a byte array based on the content encoding header
public CompressResponse ( byte output ) : byte[]
output byte The content to be compressed
Результат byte[]

CreateProxy() публичный статический Метод

Static constructor
public static CreateProxy ( HttpSocket socketBP ) : AbstractProxyLogic
socketBP HttpSocket
Результат AbstractProxyLogic

EncodeStringResponse() публичный Метод

Get an encoded byte array for a given string
public EncodeStringResponse ( string s, Encoding encoding ) : byte[]
s string
encoding System.Text.Encoding
Результат byte[]

GetContent() защищенный Метод

If this method is called on a response, either the custom response pipeline or the 302 redirect MUST be used.
protected GetContent ( ) : byte[]
Результат byte[]

GetResponseMessageStream() публичный Метод

Interpret a message with respect to its content encoding
public GetResponseMessageStream ( Stream inS ) : Stream
inS Stream
Результат Stream

GetResponseMessageStream() публичный Метод

Interpret a message with respect to its content encoding
public GetResponseMessageStream ( byte msg ) : Stream
msg byte
Результат Stream

ProxyLogic() публичный Метод

Instantiate a transparent proxy
public ProxyLogic ( HttpSocket socketBP ) : System
socketBP HttpSocket Client browser-proxy socket
Результат System