help using sockets, and OOP?

Diez B. Roggisch deetsNOSPAM at web.de
Mon Dec 6 18:29:23 CET 2004


> Ok, so are there other types of sockets that aren't "blocking" ?

You don' want other types of sockets (they are pretty good the way the are)
but other ways of using them. The topics you might need to delve into are
threading, the select module and twisted.  Which at least in part Jp
already suggested...

With threading you can have one thread blocked while others still run. With
select (which is made use of in twisted) you can wait for file-descriptors
(sockets _are_ filedescriptors) to actually have data, so that a call to
them won't block. That allows for scenarios such as yours.



-- 
Regards,

Diez B. Roggisch



More information about the Python-list mailing list