Re: how to transfer integer on socket?

2007-04-21 Thread Irmen de Jong
Frank Potter wrote: Is there any easy way to transfer 4 bit integer on socket? I think you mean a 4-byte integer? Look at the struct module, anyway. --Irmen -- http://mail.python.org/mailman/listinfo/python-list

how to transfer integer on socket?

2007-04-20 Thread Frank Potter
Is there any easy way to transfer 4 bit integer on socket? I want to send like this: a=5 send_integer(socket_s,a) and receive like this: a=receive_integer(socket_s) Sending and receiving is in binary form, not transfer it to string. Is there any easy way to do this? --

Re: how to transfer integer on socket?

2007-04-20 Thread Gabriel Genellina
En Fri, 20 Apr 2007 23:48:58 -0300, Frank Potter [EMAIL PROTECTED] escribió: Is there any easy way to transfer 4 bit integer on socket? Extend it to 8 bits (1 byte) and use a single character (string of length 1) I want to send like this: a=5 send_integer(socket_s,a)