[Patches] [ python-Patches-914096 ] Little (improvement and standarization) to asyncore.

SourceForge.net noreply at sourceforge.net
Sat Mar 13 15:30:36 EST 2004


Patches item #914096, was opened at 2004-03-11 07:55
Message generated for change (Comment added) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=914096&group_id=5470

Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: alejandro david weil (aweil)
>Assigned to: A.M. Kuchling (akuchling)
Summary: Little (improvement and standarization) to asyncore.

Initial Comment:
changes: 
1- uses add/del_channel/setup_socket functions. 
Adding calls to them instead of pasting its functionallity 
inside dispatcher's code. 
 
2- added dispatcher's handle_connect_event() function. 
It's now, one place to overwrite when transparent 
wrapping dispatcher. 
 And replaced code like: 
        self.handle_connect() 
        self.connected = 1 
to: 
        handle_connect_event() 
 
3- looponce() function added. 
 
 
2 allowes to implement ssldispatcher, with little work. 
And, of course, it seems to be usefull for anyone who 
wants to subclass dispatcher. 
 
3 I used it for when I don't want to keep looping until 
connections are finished. Don't know if it's against the 
asyncore principies. 
 
Also, I decided to make this changes because I found 
things like: handle_connect() was called, and sometimes 
connected were setup to 1 before, and sometimes after 
the call. I'll expect these changes could make it work in 
a predecible way! 

----------------------------------------------------------------------

>Comment By: Raymond Hettinger (rhettinger)
Date: 2004-03-13 15:30

Message:
Logged In: YES 
user_id=80475

Andrew, is this module your baby now?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=914096&group_id=5470



More information about the Patches mailing list