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!
Yes, this would be my baby now. A brief reading of the description of the patch suggests that portions were previously committed. Will look at later today.
Changes to the poll method were done at least a year and a half ago that *added* actual error checking, rather than removing the stub. The looponce() function is unnecessary due to changes for 2.4 or 2.5 that added an optional "count" argument to loop(). There is some positive stuff in the create_socket/set_socket stuff, but I've integrated it with some other changes I'm going to be posting shortly. A variant of the close() modifications were done a while ago. The handle_connect_event is an idea, I had included equivalent semantics in other code I had written, but moving it to a method is better. I'm going to reject the patch as out of date, as most of the issues were previously taken care of. Those ideas that help, I have added them to an updated asyncore that I will be posting soon.