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

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

Public Methods

Method Description
EncodeInitialOfferMessage ( INITIAL_OFFER_MESSAGE initOfferMsg ) : byte[]

Transform the INITIAL_OFFER_MESSAGE to a byte array

EncodeResponseMessage ( RESPONSE_MESSAGE responseMessage ) : byte[]

Transform the RESPONSE_MESSAGE to a byte array

EncodeSegmentInfoMessage ( SEGMENT_INFO_MESSAGE segmentInfoMsg ) : byte[]

Transform the SEGMENT_INFO_MESSAGE to a byte array

Private Methods

Method Description
GetBytesFromUint ( uint value, bool isBigEndian ) : byte[]

Convert the uint type value to byte array.

GetBytesFromUint16 ( ushort value, bool isBigEndian ) : byte[]

Convert the uint16 type value to byte array.

GetBytesFromUint32 ( uint value, bool isBigEndian ) : byte[]

Convert the uint type value to byte array.

GetBytesFromUlong ( ulong value, bool isBigEndian ) : byte[]

Convert the ulong type value to byte array.

GetBytesFromUshort ( ushort value, bool isBigEndian ) : byte[]

Convert the uint16 type value to byte array.

Reverse ( byte data ) : byte[]

Reverse the content of an array.

ReverseByFlag ( byte data, bool isBigEndian ) : void

reverse the bytes if it's not big endian.

Method Details

EncodeInitialOfferMessage() public static method

Transform the INITIAL_OFFER_MESSAGE to a byte array
public static EncodeInitialOfferMessage ( INITIAL_OFFER_MESSAGE initOfferMsg ) : byte[]
initOfferMsg INITIAL_OFFER_MESSAGE The INITIAL_OFFER_MESSAGE message
return byte[]

EncodeResponseMessage() public static method

Transform the RESPONSE_MESSAGE to a byte array
public static EncodeResponseMessage ( RESPONSE_MESSAGE responseMessage ) : byte[]
responseMessage RESPONSE_MESSAGE The RESPONSE_MESSAGE message
return byte[]

EncodeSegmentInfoMessage() public static method

Transform the SEGMENT_INFO_MESSAGE to a byte array
public static EncodeSegmentInfoMessage ( SEGMENT_INFO_MESSAGE segmentInfoMsg ) : byte[]
segmentInfoMsg SEGMENT_INFO_MESSAGE The SEGMENT_INFO_MESSAGE message
return byte[]