help on packet format for tcp/ip programming
Bjoern Schliessmann
usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Wed Feb 7 20:43:15 EST 2007
rattan at cps.cmich.edu wrote:
> I want a specific packet format for packet exchange between a
> client server across the network. For example frame format
> as a python class could be:
> class Frame:
> def __init__(self, buffer=None, count=0, offset=0):
> self.buffer = buffer
> self.count = count
> self.offset = offset
> the question is how to convert it to a byte stream so that format
> of count and offset also becomes a sequence of bytes.
Try struct.
Regards,
Björn
--
BOFH excuse #208:
Your mail is being routed through Germany ... and they're censoring
us.
More information about the Python-list
mailing list