8bit align struct fields

This commit is contained in:
mochi
2022-01-28 21:05:50 +00:00
parent a60c96c889
commit 6550b8d680
11 changed files with 64 additions and 79 deletions

View File

@@ -6,11 +6,11 @@ import (
// FixedHeader contains the values of the fixed header portion of the MQTT packet.
type FixedHeader struct {
Type byte // the type of the packet (PUBLISH, SUBSCRIBE, etc) from bits 7 - 4 (byte 1).
Dup bool // indicates if the packet was already sent at an earlier time.
Qos byte // indicates the quality of service expected.
Retain bool // whether the message should be retained.
Remaining int // the number of remaining bytes in the payload.
Type byte // the type of the packet (PUBLISH, SUBSCRIBE, etc) from bits 7 - 4 (byte 1).
Qos byte // indicates the quality of service expected.
Dup bool // indicates if the packet was already sent at an earlier time.
Retain bool // whether the message should be retained.
}
// Encode encodes the FixedHeader and returns a bytes buffer.