how to transfer integer on socket?

Frank Potter at
Sat Apr 21 04:48:58 CEST 2007

Is there any easy way to transfer 4 bit integer on socket?

I want to send like this:


and receive like this:

Sending and receiving is in binary form, not transfer it to string.
Is there any easy way to do this?

More information about the Python-list mailing list