This commit is contained in:
shoopea 2020-06-15 12:48:31 +02:00
parent de80b6025f
commit 420ffc9b97

View File

@ -31,13 +31,13 @@ func main() {
for {
if read >= 3 {
logInfoDebug("Packet read")
//logInfoDebug("Packet read")
break
}
n, err = r.Read(b[read:])
logErrorDebug(err, "r.Read")
read += n
logInfoDebug("Waiting for packet, read %d bytes.", read)
//logInfoDebug("Waiting for packet, read %d bytes.", read)
}
p.PLength = binary.LittleEndian.Uint16(b[0:])
@ -47,7 +47,7 @@ func main() {
break
}
logInfoDebug("Waiting for packet data : len : %d / type : %d", p.PLength, p.PType)
//logInfoDebug("Waiting for packet data : len : %d / type : %d", p.PLength, p.PType)
for {
if read >= int(p.PLength) {
@ -57,7 +57,7 @@ func main() {
n, err = r.Read(b[read:])
logErrorDebug(err, "r.Read")
read += n
logInfoDebug("Waiting for data, read %d/%d bytes.", read, p.PLength)
//logInfoDebug("Waiting for data, read %d/%d bytes.", read, p.PLength)
}