Метод | Описание | |
---|---|---|
CalculateMessageLength ( |
Calculate message length based on payload length
|
|
CalculateOnDiskMessageLength ( |
Calculate "on-disk" message length based on payload length. It differ from CalculateMessageLengh by additional 4 bytes that occupied by message lengh Int32 value
|
|
CalculatePayloadLength ( |
Calculate payload length based on message length
|
|
CreateMessage ( byte payload ) : |
Factory method for creating message with payload
|
|
Validate ( ) : void |
Validate message by computing CRC32 hash for payload and comparing with Crc property. Throws exception if validation fails.
|
Метод | Описание | |
---|---|---|
ByteArraysEqual ( byte b1, byte b2 ) : bool |
Trivial, yet efficient, byte array comparison
|
public static CalculateMessageLength ( |
||
payloadLength | ||
Результат |
public static CalculateOnDiskMessageLength ( |
||
payloadLength | ||
Результат |
public static CalculatePayloadLength ( |
||
messageLength | ||
Результат |
public static CreateMessage ( byte payload ) : |
||
payload | byte | |
Результат |