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

Pccrr server.
Inheritance: IDisposable
Afficher le fichier Open project: Microsoft/WindowsProtocolTestSuites Class Usage Examples

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Release resources.

Private Methods

Méthode 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 méthode

Close connections.
public CloseConnections ( ) : void
Résultat void

CreateMsgBlkListResponse() public méthode

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.
Résultat PccrrBLKLISTResponsePacket

CreateMsgBlkResponse() public méthode

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.
Résultat PccrrBLKResponsePacket

CreateMsgBlkResponse() public méthode

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.
Résultat PccrrBLKResponsePacket

CreateMsgNegoResponse() public méthode

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.
Résultat PccrrNegoResponsePacket

CreateSegListResponse() public méthode

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.
Résultat PccrrSegListResponsePacket

Dispose() public méthode

Release resources.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

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.
Résultat void

PccrrServer() public méthode

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

PccrrServer() public méthode

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.
Résultat System

PccrrServer() public méthode

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.
Résultat System

SendBytes() public méthode

Send bytes.
public SendBytes ( byte bytes ) : void
bytes byte The bytes need to be sent.
Résultat void

SendPacket() public méthode

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

StartListening() public méthode

Start listening.
public StartListening ( ) : void
Résultat void