메소드 | 설명 | |
---|---|---|
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 | |
리턴 |