Sockets: Sending/receiving arbitrary amounts of data
skip at pobox.com
skip at pobox.com
Sun Apr 29 23:49:53 EDT 2001
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