0

I'm receiving frames from a websocket server and I'm not sure how to interpret some of the bytes object because they are mixed with actual words inside them.

I get something like this: b'\x00\x17\x04\x00\x00\x00\xc0\x05FOCUS\x01\x00\xff\xfc\x00\x05;\xea\x01\x03\xe8\x81'

This one has 'FOCUS' and a ';' in it. I am expecting 'FOCUS' to be part of the payload, but I don't know why it's showing up as is, and not in hex form. Can someone explain what's going on and how I can unpack the rest of the data?

Also, it seems I'm getting the data in reverse order. I think \x81 is supposed to be the first byte of the frame.

I'm using Python 3.6 and the websocket-client lib. Thank you.

mp808
  • 21
  • 3

0 Answers0