Python and UDP sockets

Alex Martelli aleax at aleax.it
Tue Oct 21 06:27:22 EDT 2003


Zunbeltz Izaola wrote:
   ...
> C (BSD sockets), but i don't know how to send this kind of struct
> directly.

You transform the tuple of field values into a string with struct.pack
and send the string.  And vv in receiving.  See:

http://www.python.org/doc/current/lib/module-struct.html


Alex





More information about the Python-list mailing list