struct error

After the binary data is displayed using the package struct.pack 0

 

 

print (len (jdata)) 

hundred struct.pack = ( "i", only (jdata)) 
print (hundred) # 0

  

64  
b'@\x00\x00\x00' 

  This problem occurs while True service loop has two ends, resulting in multiple data received, after receiving the second received data results in zero, the solution: only one set while loop

Guess you like

Origin www.cnblogs.com/xzcvblogs/p/10992715.html