socket.recvfrom() & sendto()
Ron Johnson
ron.l.johnson at home.com
Mon May 7 23:03:40 EDT 2001
Van Gale wrote:
> 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.
Thank you. Following the HOWTO, I have understand blocking sockets,
and have written a wrapper module that makes writing the writing of
a blocking server trivial. Of course, in real life, non-blocking
servers are more useful...
> 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.
--
Ron Johnson, Jr. Home: ron.l.johnson at home.com
Jefferson, LA USA http://ronandheather.dhs.org
"Is Python better or worse than Perl?"
"Perl is worse than Python because people wanted it
worse." -Larry Wall, 10/14/1998
More information about the Python-list
mailing list