C# Class Microsoft.Protocols.TestSuites.Pccrr.PccrrClientAdapter

This class is used to provide internal function of sending or receiving message on server.
Inheritance: Microsoft.Protocols.TestTools.ManagedAdapterBase, IPccrrClientAdapter
Show file Open project: Microsoft/WindowsProtocolTestSuites

Public Methods

Method Description
Initialize ( ITestSite testSite ) : void

Initialize adapter data and create connection.

Reset ( ) : void

Reset the adapter

SendMsgBlk ( bool isTimerExpire, bool isSameSegment, DWHashAlgValues dwHashAlgoValues, uint index, bool isLastBLK ) : void

Send message MSG_BLK.

SendMsgBlkList ( bool isTimerExpire, bool isSameSegment, DWHashAlgValues dwHashAlgoValues, bool isOverlap ) : void

Send message MSG_BLKLIST.

SendMsgNegoResp ( bool isSupportVersion, bool isWellFormed ) : void

Send message MSG_NEGO_RESP.

Protected 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.

Private Methods

Method Description
GetProperty ( string propName ) : string

Get the value of property in ptfconfig file.

RetrievalTransport_Receive ( IPEndPoint remoteAddr, PccrrPacket pccrrPacket ) : void

Verify the received message from client.

VerifyGetBlkList ( MSG_GETBLKLIST getBlkList ) : void

MSG_GETBLKLIST structure capture.

VerifyGetBlocks ( MSG_GETBLKS getBlks ) : void

MSG_GETBLKS structure capture

VerifyRequestMessage ( REQUEST_MESSAGE requestMessage ) : void

REQUEST_MESSAGE structure capture

Method Details

Dispose() protected method

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.
protected Dispose ( bool disposing ) : void
disposing bool /// 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. ///
return void

Initialize() public method

Initialize adapter data and create connection.
public Initialize ( ITestSite testSite ) : void
testSite ITestSite the test site
return void

Reset() public method

Reset the adapter
public Reset ( ) : void
return void

SendMsgBlk() public method

Send message MSG_BLK.
public SendMsgBlk ( bool isTimerExpire, bool isSameSegment, DWHashAlgValues dwHashAlgoValues, uint index, bool isLastBLK ) : void
isTimerExpire bool The timer for SendMsgBlk from client will expire or not.
isSameSegment bool The message is for the segment that client request.
dwHashAlgoValues DWHashAlgValues The dwHashAlgo value.
index uint Block index
isLastBLK bool If it is true, the block is the last BLK.
return void

SendMsgBlkList() public method

Send message MSG_BLKLIST.
public SendMsgBlkList ( bool isTimerExpire, bool isSameSegment, DWHashAlgValues dwHashAlgoValues, bool isOverlap ) : void
isTimerExpire bool The timer for SendMsgBlkList from client will expire or not.
isSameSegment bool The SegmentID is same as the request from client.
dwHashAlgoValues DWHashAlgValues The dwHashAlgo value.
isOverlap bool The block ranges overlap with the ranges specified in any request /// with a matching Segment ID in the outstanding request list.
return void

SendMsgNegoResp() public method

Send message MSG_NEGO_RESP.
public SendMsgNegoResp ( bool isSupportVersion, bool isWellFormed ) : void
isSupportVersion bool If it is true, it is support version, if it is false, it is not support version.
isWellFormed bool If it is true, it is well formed, if it is false, it is not well formed.
return void