Designing socket messaging format
ykingma at accessforall.nl
Tue Nov 13 20:16:40 CET 2001
> cimarron+google at taylors.org (Cimarron Taylor) wrote in message news:<29e28c51.0111120234.35d10048 at posting.google.com>...
> > shriek at gmx.co.uk (Stephen) wrote in message news:<97ae44ee.0111111912.14006c7f at posting.google.com>...
> > > I'm developing a program which sends messages back and forth
> > > between two servers using sockets. The message format I've
> > > been given is "YYYYTTTTTTTTTTTTTTTTTTTTTTT"
> > Why not save yourself a little coding and just use netstrings?
> > more info: http://itamarst.org/multiplex
> > advogato copy: http://www.advogato.org/article/212.html
> > python code: http://itamarst.org/downloads/multiplex-0.2.tgz
> > description: http://cr.yp.to/proto/netstrings.txt
> Thanks for pointing this out. Is anybody actually
> using it though ? Would be a bit concerned with it
> being 0.2 release.
It works fine. For efficiency you might need to add buffering
especially on the receiving side.
> I guess the main reason not to use netstrings is
> the ability to interface with other servers that
> don't have the netstrings package or the desire to
> install it. Sockets seem to be the lowest
> common denominator.
You would normally use them for messages both
ways, with the same python module on both sides.
email at xs4all.nl
More information about the Python-list