maybe
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m58s

This commit is contained in:
matst80
2024-11-10 21:43:40 +01:00
parent 0f3b22e8da
commit c70c5cd930
12 changed files with 84 additions and 153 deletions

View File

@@ -10,7 +10,7 @@ import (
)
type CartPacketWithData struct {
MessageType uint16
MessageType uint32
Id CartId
Added time.Time
Consumed bool
@@ -33,7 +33,7 @@ func NewCartPacketQueue(connection net.Conn) *CartPacketQueue {
defer connection.Close()
var packet CartPacket
for {
err := ReadPacket(connection, &packet)
err := ReadCartPacket(connection, &packet)
ts := time.Now()
if err != nil {
@@ -73,7 +73,7 @@ func NewCartPacketQueue(connection net.Conn) *CartPacketQueue {
return queue
}
func (p *CartPacketQueue) Expect(messageType uint16, id CartId, timeToWait time.Duration) (*CartPacketWithData, error) {
func (p *CartPacketQueue) Expect(messageType uint32, id CartId, timeToWait time.Duration) (*CartPacketWithData, error) {
start := time.Now().Add(-time.Millisecond)
for {