Sockets: Sending/receiving arbitrary amounts of data

Daniel Klein DanielK at aracnet.com
Tue May 1 15:06:18 CEST 2001


Skip,

The application is not an exersize but a real project I am working on to
create a Python client that sends/recvs arbitrary amounts of data to/from a
proprietary database using pipes. I will have a look at XML-RPC but I
suspect that this is not what I am looking for.

Neil Schemenauer provided a viable solution and I am working this to the
code now.

Thanks for your reply,

Daniel Klein
Portland OR USA

> -----Original Message-----
> From: skip at pobox.com [mailto:skip at pobox.com]
> Sent: Sunday, April 29, 2001 8:50 PM
> To: Daniel Klein
> Cc: python-list at python.org
> Subject: Re: Sockets: Sending/receiving arbitrary amounts of data
>
>
>
>     Daniel> Just starting to get my head around sockets ...
>
>     Daniel> ... I'd just like to know if there is a
> 'high-level' way to
>     Daniel> implement this so that client and server handle
> the requests
>     Daniel> regardless of how much data is being sent/recv'd ?
>
> Neil Schemenauer already responded about adding terminators
> and such to
> indicate end of message for homegrown protocols.  I will go a
> bit off-topic
> and suggest that unless one of the following is true:
>
>     * you are using this exercise solely for a bit of education, or
>
>     * you will be speaking to a service for which there is already an
>       existing protocol but for which Python doesn't already provide a
>       library (this excludes protocols like FTP, Telnet, NNTP
> and SMTP)
>
> that you look at using something like XML-RPC, which already
> exists and is
> supported by many libraries written in many different
> languages (including
> Python, of course).  XML-RPC can be found at http://www.xmlrpc.com/.
>
> --
> Skip Montanaro (skip at pobox.com)
> (847)971-7098
>





More information about the Python-list mailing list