help on packet format for tcp/ip programming

Felipe Almeida Lessa felipe.lessa at gmail.com
Wed Feb 7 22:17:14 EST 2007


On 7 Feb 2007 19:14:13 -0800, rattan at cps.cmich.edu <rattan at cps.cmich.edu>
> struct module pack and unpack will only work for fixed size buffer :
> pack('>1024sIL', buffer, count. offset) but the buffer size can vary
> from one packet to the next  :-(

Then send the size of the buffer before the buffer, so the recipient
can expect that many bytes.

-- 
Felipe.



More information about the Python-list mailing list