test
This commit is contained in:
parent
de80b6025f
commit
420ffc9b97
8
main.go
8
main.go
@ -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)
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user