require header match
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 27s
Build and Publish / BuildAndDeploy (push) Successful in 2m16s

This commit is contained in:
matst80
2024-11-12 22:31:19 +01:00
parent 438358e4b3
commit e1b254668f
6 changed files with 52 additions and 7 deletions

View File

@@ -48,7 +48,7 @@ func NewCartTCPClient(address string) (*CartTCPClient, error) {
}
func (m *CartTCPClient) SendPacket(messageType CartMessage, id CartId, data []byte) error {
m.Conn.Write(header[:])
err := binary.Write(m.Conn, binary.LittleEndian, CartPacket{
Version: CurrentPacketVersion,
MessageType: messageType,