C# Class Microsoft.Protocols.TestTools.StackSdk.BranchCache.Pccrr.PccrrServer

Pccrr server.
Inheritance: IDisposable
ファイルを表示 Open project: Microsoft/WindowsProtocolTestSuites Class Usage Examples

Public Methods

Method Description
CloseConnections ( ) : void

Close connections.

CreateMsgBlkListResponse ( byte segmentId, BLOCK_RANGE blockRanges, uint nextBlockIndex, CryptoAlgoId_Values cryptoAlgoIdValues, MsgType_Values msgTypeValues ) : PccrrBLKLISTResponsePacket

Create a MsgBlkList response.

CreateMsgBlkResponse ( byte segmentId, byte block, CryptoAlgoId_Values cryptoAlgoIdValues, MsgType_Values msgTypeValues, bool isLastBLKAvail ) : PccrrBLKResponsePacket

Create a MsgBlk response.

CreateMsgBlkResponse ( byte segmentId, byte block, CryptoAlgoId_Values cryptoAlgoIdValues, MsgType_Values msgTypeValues, byte iv, uint blockIndex, uint nextBlockIndex ) : PccrrBLKResponsePacket

Create a MsgBlk response.

CreateMsgNegoResponse ( ProtoVersion minSupportedProtocolVer, ProtoVersion maxSupportedProtocolVer, CryptoAlgoId_Values cryptoAlgoIdValues, MsgType_Values msgTypeValues ) : PccrrNegoResponsePacket

Create a MsgNego response.

CreateSegListResponse ( CryptoAlgoId_Values cryptoAlgoIdValues, System.Guid requestID, BLOCK_RANGE segmentRanges ) : PccrrSegListResponsePacket

Create a MsgSegList response.

Dispose ( ) : void

Release resources.

PccrrServer ( int serverPort ) : System

Initializes a new instance of the PccrrServer class with default settings.

PccrrServer ( int serverPort, string pccrrPath, IPAddressType addressType ) : System

Initializes a new instance of the PccrrServer class.

PccrrServer ( int serverPort, string pccrrPath, IPAddressType addressType, ILogPrinter logger ) : System

Initializes a new instance of the PccrrServer class.

SendBytes ( byte bytes ) : void

Send bytes.

SendPacket ( PccrrPacket packet ) : void

Send a packet.

StartListening ( ) : void

Start listening.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Release resources.

Private Methods

Method Description
DecodePacket ( Uri uri, HttpMethod httpMethod, byte rawdata ) : PccrrPacket

Decode a packet.

DecomposeHttpRequest ( HttpListenerRequest httpListenerRequest ) : byte[]

Gets the request body byte array from the http request.

HttpServerTransport_ReceiveFrom ( object sender, HttpRequestEventArg e ) : void

Receive pccrr message.

Method Details

CloseConnections() public method

Close connections.
public CloseConnections ( ) : void
return void

CreateMsgBlkListResponse() public method

Create a MsgBlkList response.
public CreateMsgBlkListResponse ( byte segmentId, BLOCK_RANGE blockRanges, uint nextBlockIndex, CryptoAlgoId_Values cryptoAlgoIdValues, MsgType_Values msgTypeValues ) : PccrrBLKLISTResponsePacket
segmentId byte The segmentId.
blockRanges BLOCK_RANGE The blockRanges.
nextBlockIndex uint The nextBlockIndex.
cryptoAlgoIdValues CryptoAlgoId_Values The cryptoAlgoId.
msgTypeValues MsgType_Values The msgType.
return PccrrBLKLISTResponsePacket

CreateMsgBlkResponse() public method

Create a MsgBlk response.
public CreateMsgBlkResponse ( byte segmentId, byte block, CryptoAlgoId_Values cryptoAlgoIdValues, MsgType_Values msgTypeValues, bool isLastBLKAvail ) : PccrrBLKResponsePacket
segmentId byte The segmentId.
block byte The block.
cryptoAlgoIdValues CryptoAlgoId_Values The cryptoAlgoId.
msgTypeValues MsgType_Values The msgType.
isLastBLKAvail bool If it is true, the block is the last available block.
return PccrrBLKResponsePacket

CreateMsgBlkResponse() public method

Create a MsgBlk response.
public CreateMsgBlkResponse ( byte segmentId, byte block, CryptoAlgoId_Values cryptoAlgoIdValues, MsgType_Values msgTypeValues, byte iv, uint blockIndex, uint nextBlockIndex ) : PccrrBLKResponsePacket
segmentId byte The segmentId.
block byte The block.
cryptoAlgoIdValues CryptoAlgoId_Values The cryptoAlgoId.
msgTypeValues MsgType_Values The msgType.
iv byte The initial vector.
blockIndex uint Block index.
nextBlockIndex uint Next available block index.
return PccrrBLKResponsePacket

CreateMsgNegoResponse() public method

Create a MsgNego response.
public CreateMsgNegoResponse ( ProtoVersion minSupportedProtocolVer, ProtoVersion maxSupportedProtocolVer, CryptoAlgoId_Values cryptoAlgoIdValues, MsgType_Values msgTypeValues ) : PccrrNegoResponsePacket
minSupportedProtocolVer ProtoVersion The minSupportedProtocolVersion.
maxSupportedProtocolVer ProtoVersion The maxSupportedProtocolVersion.
cryptoAlgoIdValues CryptoAlgoId_Values The cryptoAlgoId.
msgTypeValues MsgType_Values The msgType.
return PccrrNegoResponsePacket

CreateSegListResponse() public method

Create a MsgSegList response.
public CreateSegListResponse ( CryptoAlgoId_Values cryptoAlgoIdValues, System.Guid requestID, BLOCK_RANGE segmentRanges ) : PccrrSegListResponsePacket
cryptoAlgoIdValues CryptoAlgoId_Values The cryptoAlgoId.
requestID System.Guid Request ID.
segmentRanges BLOCK_RANGE Segment ranges.
return PccrrSegListResponsePacket

Dispose() public method

Release 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

PccrrServer() public method

Initializes a new instance of the PccrrServer class with default settings.
public PccrrServer ( int serverPort ) : System
serverPort int The server port.
return System

PccrrServer() public method

Initializes a new instance of the PccrrServer class.
public PccrrServer ( int serverPort, string pccrrPath, IPAddressType addressType ) : System
serverPort int The server port.
pccrrPath string The pccrr path.
addressType IPAddressType The IP address type.
return System

PccrrServer() public method

Initializes a new instance of the PccrrServer class.
public PccrrServer ( int serverPort, string pccrrPath, IPAddressType addressType, ILogPrinter logger ) : System
serverPort int The server port.
pccrrPath string The pccrr path.
addressType IPAddressType The IP address type.
logger ILogPrinter The specified logger.
return System

SendBytes() public method

Send bytes.
public SendBytes ( byte bytes ) : void
bytes byte The bytes need to be sent.
return void

SendPacket() public method

Send a packet.
public SendPacket ( PccrrPacket packet ) : void
packet PccrrPacket The packet need to be sent.
return void

StartListening() public method

Start listening.
public StartListening ( ) : void
return void