socket.recvfrom() & sendto()

Van Gale cgale1 at _remove_home.com
Mon May 7 19:29:10 EDT 2001


Ron,

A few people have answered your specific question, but if it's still not
clear try taking a look at http://www.mcmillan-inc.com/sock1.html for a good
basic introduction to socket programming on Python.

Once you understand that, then go use the asyncore module (part of the
standard distribution), which can support thousands of non-blocking sockets
at one time.  It scales well because it can use poll() instead of select(),
and it's author put a lot of time into making it scalable.  The asyncore
module is used in the real world on a number of high-load servers (even NT
types).

Documentation on asyncore is a little sparse, IMHO, so it's probably a good
idea to download Medusa to see lots of example code for building HTTP
servers, FTP servers, xmlrpc servers, etc. that use asyncore.

Van






More information about the Python-list mailing list