prob with struct and byte order

John Machin sjmachin at lexicon.net
Mon Jul 24 17:11:30 EDT 2006


nephish at xit.net wrote:

> the starting and ending deliminators are ASCII 'STX' and 'ENX'. i
> wondered why they did it like that also. But they did.
>
> the message length is a 4 byte integer indicating how long the message
> body is.
> the message type is also 4 bytes. There is a table in the docs that
> describe what each message type is. for example 200 = login,
> etc...etc...
>
> the big deal in the docs goes on about how the clients need the byte
> order to match that of the arch that the server runs on 'Sun
> UltraSPARC' , i think they run Solaris.
>
> if i sound like i do not know what i am talking about... there is a
> reason...  i am very new to this type of communication with the server.
> I have about 6 months with python ( my first language ).
>

Perhaps if you could post
(a) the *FULL* docs for one record type -- it's not apparent whether
you have these or not; Grant is trying to show you how to do elementary
data detective work ...
(b) the Python repr() of an example or two of that record type
(c) what you expect (or are told) that example data means,
we could post back some sample complete code with a bit of explanation

Cheers,
John




More information about the Python-list mailing list