C# Class Microsoft.Protocols.TestTools.StackSdk.BranchCache.Pccrtp.PccrtpClient

The test client.
Inheritance: IDisposable
Mostra file Open project: Microsoft/WindowsProtocolTestSuites Class Usage Examples

Public Methods

Method Description
CreateHttpRequest ( string serverAddress, int port, string fileName, string>.Dictionary httpHeader ) : PccrtpRequest

Create HTTP request message with custom HTTP header.

CreatePccrtpRequest ( string serverAddress, int port, string requestFileName, BranchCacheVersion version = BranchCacheVersion.V1, bool missingData = false ) : PccrtpRequest

Create PCCRTP request message.

Dispose ( ) : void

Release the managed and unmanaged resources.

PccrtpClient ( ) : System

Initializes a new instance of the PccrtpClient class.

PccrtpClient ( ILogPrinter logger ) : System

Initializes a new instance of the PccrtpClient class.

SendHttpRequest ( HttpVersionType httpVersion, PccrtpRequest request, int timeOut ) : PccrtpResponse

Send HTTP request for the full content and receive HTTP response from the server.

SendHttpRequest ( HttpVersionType httpVersion, PccrtpRequest request, int timeOut, int rangeFrom, int rangeTo ) : PccrtpResponse

Send HTTP request for partial content and receive HTTP response from the server.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Release resources.

Method Details

CreateHttpRequest() public method

Create HTTP request message with custom HTTP header.
public CreateHttpRequest ( string serverAddress, int port, string fileName, string>.Dictionary httpHeader ) : PccrtpRequest
serverAddress string The server address.
port int The port
fileName string The reuqest uri.
httpHeader string>.Dictionary The HTTP header.
return PccrtpRequest

CreatePccrtpRequest() public method

Create PCCRTP request message.
public CreatePccrtpRequest ( string serverAddress, int port, string requestFileName, BranchCacheVersion version = BranchCacheVersion.V1, bool missingData = false ) : PccrtpRequest
serverAddress string The server address.
port int The port.
requestFileName string The request uri.
version BranchCacheVersion Version of branch cache.
missingData bool True if this is a missing data request; false otherwise.
return PccrtpRequest

Dispose() public method

Release the managed and unmanaged resources.
public Dispose ( ) : void
return void

Dispose() protected method

Release resources.
protected Dispose ( bool disposing ) : void
disposing bool /// If disposing equals true, managed and unmanaged resources are disposed. /// If false, only unmanaged resources can be disposed. ///
return void

PccrtpClient() public method

Initializes a new instance of the PccrtpClient class.
public PccrtpClient ( ) : System
return System

PccrtpClient() public method

Initializes a new instance of the PccrtpClient class.
public PccrtpClient ( ILogPrinter logger ) : System
logger ILogPrinter An instance of ILogPrinter.
return System

SendHttpRequest() public method

Send HTTP request for the full content and receive HTTP response from the server.
public SendHttpRequest ( HttpVersionType httpVersion, PccrtpRequest request, int timeOut ) : PccrtpResponse
httpVersion HttpVersionType he HTTP version.
request PccrtpRequest The HTTP reqeust.
timeOut int The time out to wait the response.
return PccrtpResponse

SendHttpRequest() public method

Send HTTP request for partial content and receive HTTP response from the server.
public SendHttpRequest ( HttpVersionType httpVersion, PccrtpRequest request, int timeOut, int rangeFrom, int rangeTo ) : PccrtpResponse
httpVersion HttpVersionType The HTTP version.
request PccrtpRequest The PCCRTP request.
timeOut int The number of milliseconds to wait before the request times out
rangeFrom int The start position at which to the requested data.
rangeTo int The end position at which to the requested data.
return PccrtpResponse