Re: write unsigned integer 32 bits to socket

2008-07-28 Thread Grant Edwards
On 2008-07-28, Alan Franzoni <[EMAIL PROTECTED]> wrote: > Scott David Daniels was kind enough to say: > >> Alan Franzoni wrote: > >> Please don't pass this misinformation along. >> >> In the struct module document, see the section on the initial character: >> Character Byte order Size and ali

Re: write unsigned integer 32 bits to socket

2008-07-28 Thread Alan Franzoni
Scott David Daniels was kind enough to say: > Alan Franzoni wrote: > Please don't pass this misinformation along. > > In the struct module document, see the section on the initial character: > Character Byte order Size and alignment >@ nativenative >=

Re: write unsigned integer 32 bits to socket

2008-07-28 Thread [EMAIL PROTECTED]
On Mon, Jul 28, 2008 at 5:45 AM, Scott David Daniels <[EMAIL PROTECTED]> wrote: > Alan Franzoni wrote: >> >> Michael Torrie was kind enough to say: >> >>> Of course any time you send coherent numbers over the network, I highly >>> recommend you use what's called network byte order I'm sure pyt

Re: write unsigned integer 32 bits to socket

2008-07-28 Thread Scott David Daniels
Alan Franzoni wrote: Michael Torrie was kind enough to say: Of course any time you send coherent numbers over the network, I highly recommend you use what's called network byte order I'm sure python has some convention in the struct module for dealing with this. Not in the struct module;

Re: write unsigned integer 32 bits to socket

2008-07-28 Thread Alan Franzoni
Michael Torrie was kind enough to say: > Of course any time you send coherent numbers over the network, I highly > recommend you use what's called network byte order. In C, you'd use the > htonl() call, and then when pulling it off the wire on the other end > you'd use ntohl(). If you don't the

Re: write unsigned integer 32 bits to socket

2008-07-27 Thread Michael Torrie
[EMAIL PROTECTED] wrote: > thanks a lot!!! re-read it again!!! > > from the struct doc! > Standard size and alignment are as follows: no alignment is required > for any type (so you have to use pad bytes); short is 2 bytes; int and > long are 4 bytes; long long (__int64 on Windows) is 8 bytes; flo

Re: write unsigned integer 32 bits to socket

2008-07-27 Thread [EMAIL PROTECTED]
On Sun, Jul 27, 2008 at 7:17 PM, Larry Bates <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: >> On Sun, Jul 27, 2008 at 7:01 PM, Larry Bates <[EMAIL PROTECTED]> >> wrote: >>> [EMAIL PROTECTED] wrote: i want to send unsigned 32 bit integer to socket, and looking for something equival

Re: write unsigned integer 32 bits to socket

2008-07-27 Thread Larry Bates
[EMAIL PROTECTED] wrote: On Sun, Jul 27, 2008 at 7:01 PM, Larry Bates <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: i want to send unsigned 32 bit integer to socket, and looking for something equivalent to this method... http://livedocs.adobe.com/flex/2/langref/flash/net/Socket.html#write

Re: write unsigned integer 32 bits to socket

2008-07-27 Thread [EMAIL PROTECTED]
On Sun, Jul 27, 2008 at 7:01 PM, Larry Bates <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: >> i want to send unsigned 32 bit integer to socket, and looking for >> something equivalent to this method... >> http://livedocs.adobe.com/flex/2/langref/flash/net/Socket.html#writeUnsignedInt() >> >

Re: write unsigned integer 32 bits to socket

2008-07-27 Thread Larry Bates
[EMAIL PROTECTED] wrote: hi i want to send unsigned 32 bit integer to socket, and looking for something equivalent to this method... http://livedocs.adobe.com/flex/2/langref/flash/net/Socket.html#writeUnsignedInt() is there such method / library available in python?! this is as far as i have

write unsigned integer 32 bits to socket

2008-07-27 Thread [EMAIL PROTECTED]
hi i want to send unsigned 32 bit integer to socket, and looking for something equivalent to this method... http://livedocs.adobe.com/flex/2/langref/flash/net/Socket.html#writeUnsignedInt() is there such method / library available in python?! this is as far as i have gotten along >>> s = socket