I’m sending an Integer from my Java Client to my Python Server using:
outputStream.writeInt(5);
And on the server:
_id = self.request.recv(4)
I get:
Name | Type| Value
_id | str | '\x00\x00\x00\x05'
How can i decode this and convert it back to Integer ?
You can decode this with the python
structmodule:The
>ipattern expects a big-endian signed integer (4 bytes).