Implemented hearthbit client side + tests
This commit is contained in:
@@ -99,6 +99,20 @@ func BuildDisconnectPacket() []byte {
|
||||
})
|
||||
}
|
||||
|
||||
// BuildAckPacket returns a 17-byte ACK datagram. Unicast clients send it
|
||||
// periodically as a keepalive: UDPSServer refreshes the client's last-seen
|
||||
// without re-sending CONFIG (which a repeated CONNECT would trigger).
|
||||
func BuildAckPacket() []byte {
|
||||
return buildHeader(PacketHeader{
|
||||
Magic: MagicUDPS,
|
||||
Type: PktACK,
|
||||
Counter: 0,
|
||||
FragmentIdx: 0,
|
||||
TotalFragments: 1,
|
||||
PayloadBytes: 0,
|
||||
})
|
||||
}
|
||||
|
||||
// ─── Signal descriptor (136 bytes) ───────────────────────────────────────────
|
||||
|
||||
// SignalInfo holds the parsed metadata for one signal.
|
||||
|
||||
Reference in New Issue
Block a user