Broadcast server

Damjan gdamjan at gmail.com
Fri Sep 1 02:24:15 CEST 2006


swell at netcourrier.com wrote:

> I would like to write a server with the low level API of python (
> socket+select and/or socket+thread ) that allow me to register client
> and update them every X seconds ( could be the time, the temperature, a
> stock quote, a message , ... ).
> 
> How to write the server that keep hot connections with clients and
> update them when events are trigerred. I don't know how to begin this ,
> i look at the python doc but the doc is more related to client updating
> the server and i am not sure of the right design that could be use
> here.

I'd suggest to find the Richard W. Stevens book "Unix Network Programing".
You'll learn a lot about networking from that book. It's based on C, but
you'll see that the concepts can be easily used with Python too.

Find that book, and don't forget the stdlib docs:
http://docs.python.org/lib/module-socket.html
http://docs.python.org/lib/module-select.html

-- 
damjan



More information about the Python-list mailing list