Sockets

Steve Holden sholden at holdenweb.com
Wed Oct 10 08:17:12 EDT 2001


"Hugo Martires" <hugomartires at hotmail.com> wrote ...
> My server need to send 2 strings separeted:
>  s1= 'xxx'
>  s2= 'yyy'
>
> My client must received like this:
>  rec1= 'xxx'
>  rec2= 'yyy'
>
> The problem is that the Client received s1 and s2 in one only string.
>
> How can i received in 2 separeted variables ?
>
You need to encode them in some way so that the client can clearly separate
the two values. Netstrings, for example ... there are many references (as
Google will tell you), so here's just one that will explain the concept:

http://kahuna.telstra.net/ietf/old-ids/draft-bernstein-netstrings-02.txt

regards
 Steve
--
http://www.holdenweb.com/








More information about the Python-list mailing list