how to send an int over a socket

Jorgen Grahn jgrahn-nntq at algonet.se
Sat Feb 5 05:23:44 EST 2005


On 04 Feb 2005 19:24:29 -0800, Paul Rubin <> wrote:
> Tom Brown <brown at esteem.com> writes:
...
> Why don't you look at the struct module instead.  You could also look
> the xdr or xmlrpc libraries, which may be closer to what you want.

Or look at existing, successful standards like HTTP, SMTP, etc. Most of them
are text-based -- which wastes a small bit of bandwidth and CPU cycles, but
helps debugging and interoperability a lot.

The xdr module which P.R. refers to implements a simple, standard way of
passing binary datatypes over a network, and is available everywhere, for
all languages. Don't know anything about xmlrpc, except that it is
magnitudes more complex and powerful.

/Jorgen

-- 
  // Jorgen Grahn <jgrahn@       Ph'nglui mglw'nafh Cthulhu
\X/                algonet.se>   R'lyeh wgah'nagl fhtagn!



More information about the Python-list mailing list