C# Class Microsoft.Protocols.TestTools.StackSdk.BranchCache.Pchc.PCHCClient

The PCHC client class which is used to exchange the pchc message between the hosted cache server.
Inheritance: IDisposable
Mostrar archivo Open project: Microsoft/WindowsProtocolTestSuites Class Usage Examples

Public Methods

Method Description
CreateBatchedOfferMessage ( int connectionInfoPort, Content_Information_Data_Structure_V2 contentInfo ) : BATCHED_OFFER_MESSAGE

Create BATCHED_OFFER_MESSAGE package.

CreateInitialOfferMessage ( int connectionInfoPort, byte hash ) : INITIAL_OFFER_MESSAGE

Create INITIAL_OFFER_MESSAGE package.

CreateSegmentInfoMessage ( int connectionInfoPort, Content_Information_Data_Structure segmentInformation ) : SEGMENT_INFO_MESSAGE

Create SEGMENT_INFO_MESSAGE package.

CreateSegmentInfoMessage ( int connectionInfoPort, Content_Information_Data_Structure contentInformation, int segmentIndex ) : SEGMENT_INFO_MESSAGE

Create SEGMENT_INFO_MESSAGE package.

Dispose ( ) : void

Implement IDisposable. Do not make this method virtual. A derived class should not be able to override this method.

PCHCClient ( TransferProtocol httpTransportType, string serverName, int port, string resource ) : System

Initializes a new instance of the PCHCClient class With the specified http transport type, server name, linsten port number and resource.

PCHCClient ( TransferProtocol httpTransportType, string serverName, int port, string resource, ILogPrinter logger ) : System

Initializes a new instance of the PCHCClient class With the specified http transport type, server name, linsten port number and resource.

PCHCClient ( TransferProtocol httpTransportType, string serverName, int port, string resource, string domainName, string userName, string userPassword ) : System

Initializes a new instance of the PCHCClient class With the specified http transport type, server name, linsten port number and resource.

SendBatchedOfferMessage ( BATCHED_OFFER_MESSAGE batchedOfferMessage ) : RESPONSE_MESSAGE

Send the BATCHED_OFFER_MESSAGE request.

SendInitialOfferMessage ( INITIAL_OFFER_MESSAGE initialOfferMessage ) : RESPONSE_MESSAGE

Send the INITIAL_OFFER_MESSAGE request.

SendSegmentInfoMessage ( SEGMENT_INFO_MESSAGE segmentInfoMessage ) : RESPONSE_MESSAGE

Send the SEGMENT_INFO_MESSAGE request.

Private Methods

Method Description
Dispose ( bool disposing ) : void

Dispose(bool disposing) executes in two distinct scenarios. If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. If disposing equals false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed

SendByte ( byte httpRequestPayload ) : RESPONSE_MESSAGE

Send the byte array of PCHC message using https transport .

Method Details

CreateBatchedOfferMessage() public method

Create BATCHED_OFFER_MESSAGE package.
public CreateBatchedOfferMessage ( int connectionInfoPort, Content_Information_Data_Structure_V2 contentInfo ) : BATCHED_OFFER_MESSAGE
connectionInfoPort int /// A 16-bit unsigned integer that MUST be set by the client to the port /// on which it is listening as a server-role peer, for use with the retrieval protocol. ///
contentInfo Microsoft.Protocols.TestTools.StackSdk.BranchCache.Pccrc.Content_Information_Data_Structure_V2 A Content Information V2 data structure.
return BATCHED_OFFER_MESSAGE

CreateInitialOfferMessage() public method

Create INITIAL_OFFER_MESSAGE package.
public CreateInitialOfferMessage ( int connectionInfoPort, byte hash ) : INITIAL_OFFER_MESSAGE
connectionInfoPort int /// A 16-bit unsigned integer that MUST be set by the client to the port /// on which it is listening as a server-role peer, for use with the retrieval protocol. ///
hash byte The HoHoDk value of the segment.
return INITIAL_OFFER_MESSAGE

CreateSegmentInfoMessage() public method

Create SEGMENT_INFO_MESSAGE package.
public CreateSegmentInfoMessage ( int connectionInfoPort, Content_Information_Data_Structure segmentInformation ) : SEGMENT_INFO_MESSAGE
connectionInfoPort int /// A 16-bit unsigned integer that MUST be set by the client to the port /// on which it is listening as a server-role peer, for use with the retrieval protocol. ///
segmentInformation Microsoft.Protocols.TestTools.StackSdk.BranchCache.Pccrc.Content_Information_Data_Structure A Content Information data structure.
return SEGMENT_INFO_MESSAGE

CreateSegmentInfoMessage() public method

Create SEGMENT_INFO_MESSAGE package.
public CreateSegmentInfoMessage ( int connectionInfoPort, Content_Information_Data_Structure contentInformation, int segmentIndex ) : SEGMENT_INFO_MESSAGE
connectionInfoPort int /// A 16-bit unsigned integer that MUST be set by the client to the port /// on which it is listening as a server-role peer, for use with the retrieval protocol. ///
contentInformation Microsoft.Protocols.TestTools.StackSdk.BranchCache.Pccrc.Content_Information_Data_Structure A Content Information data structure.
segmentIndex int Segment index.
return SEGMENT_INFO_MESSAGE

Dispose() public method

Implement IDisposable. Do not make this method virtual. A derived class should not be able to override this method.
public Dispose ( ) : void
return void

PCHCClient() public method

Initializes a new instance of the PCHCClient class With the specified http transport type, server name, linsten port number and resource.
public PCHCClient ( TransferProtocol httpTransportType, string serverName, int port, string resource ) : System
httpTransportType TransferProtocol Http transport type.
serverName string The server name.
port int The listening port.
resource string The resource.
return System

PCHCClient() public method

Initializes a new instance of the PCHCClient class With the specified http transport type, server name, linsten port number and resource.
public PCHCClient ( TransferProtocol httpTransportType, string serverName, int port, string resource, ILogPrinter logger ) : System
httpTransportType TransferProtocol Http transport type.
serverName string The server name.
port int The listening port.
resource string The resource.
logger ILogPrinter The logger.
return System

PCHCClient() public method

Initializes a new instance of the PCHCClient class With the specified http transport type, server name, linsten port number and resource.
public PCHCClient ( TransferProtocol httpTransportType, string serverName, int port, string resource, string domainName, string userName, string userPassword ) : System
httpTransportType TransferProtocol Http transport type.
serverName string The server name.
port int The listening port.
resource string The resource.
domainName string The domain name.
userName string The user name.
userPassword string The password.
return System

SendBatchedOfferMessage() public method

Send the BATCHED_OFFER_MESSAGE request.
public SendBatchedOfferMessage ( BATCHED_OFFER_MESSAGE batchedOfferMessage ) : RESPONSE_MESSAGE
batchedOfferMessage BATCHED_OFFER_MESSAGE The BATCHED_OFFER_MESSAGE message.
return RESPONSE_MESSAGE

SendInitialOfferMessage() public method

Send the INITIAL_OFFER_MESSAGE request.
public SendInitialOfferMessage ( INITIAL_OFFER_MESSAGE initialOfferMessage ) : RESPONSE_MESSAGE
initialOfferMessage INITIAL_OFFER_MESSAGE The INITIAL_OFFER_MESSAGE message.
return RESPONSE_MESSAGE

SendSegmentInfoMessage() public method

Send the SEGMENT_INFO_MESSAGE request.
public SendSegmentInfoMessage ( SEGMENT_INFO_MESSAGE segmentInfoMessage ) : RESPONSE_MESSAGE
segmentInfoMessage SEGMENT_INFO_MESSAGE The SEGMENT_INFO_MESSAGE message.
return RESPONSE_MESSAGE