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

Unaarshal the message from byte array.
Exibir arquivo Open project: Microsoft/WindowsProtocolTestSuites Class Usage Examples

Public Methods

Method Description
DecodeInitialOfferMessage ( byte byteArr ) : INITIAL_OFFER_MESSAGE

Unmarshal the initial offer message.

DecodeResponseMessage ( byte byteArr ) : RESPONSE_MESSAGE

Unmarshal response message.

DecodeSegmentInfoMessage ( byte byteArr ) : SEGMENT_INFO_MESSAGE

Unmarshal the segment info message.

GetBytes ( byte buffer, int &index, int count ) : byte[]

Get bytes from bytes.

GetMessageType ( byte byteArr ) : PCHC_MESSAGE_TYPE

Unmarshal the incoming pchc message to get message type.

Private Methods

Method Description
GetUInt16 ( byte buffer, int &index, bool isBigEndian ) : ushort

Parse ushort from bytes

GetUInt32 ( byte buffer, int &index, bool isBigEndian ) : uint

Parse uint from bytes

ReverseByFlag ( bool isBigEndian, byte byteTemp ) : void

reverse the bytes if it's not big endian.

Method Details

DecodeInitialOfferMessage() public static method

Unmarshal the initial offer message.
public static DecodeInitialOfferMessage ( byte byteArr ) : INITIAL_OFFER_MESSAGE
byteArr byte The payload.
return INITIAL_OFFER_MESSAGE

DecodeResponseMessage() public static method

Unmarshal response message.
public static DecodeResponseMessage ( byte byteArr ) : RESPONSE_MESSAGE
byteArr byte The payload.
return RESPONSE_MESSAGE

DecodeSegmentInfoMessage() public static method

Unmarshal the segment info message.
public static DecodeSegmentInfoMessage ( byte byteArr ) : SEGMENT_INFO_MESSAGE
byteArr byte The payload.
return SEGMENT_INFO_MESSAGE

GetBytes() public static method

Get bytes from bytes.
public static GetBytes ( byte buffer, int &index, int count ) : byte[]
buffer byte the buffer stores the value.
index int the index of start to parse
count int count of bytes
return byte[]

GetMessageType() public static method

Unmarshal the incoming pchc message to get message type.
public static GetMessageType ( byte byteArr ) : PCHC_MESSAGE_TYPE
byteArr byte The payload.
return PCHC_MESSAGE_TYPE