Hi all,
I never used POE so far but I think I've contributed a bit. Please read on. I made some changes to the proxy.perl in samples directory of POE distribution. It seems that you shouldn't delete wheels (serv & cli) when you get an error but yield an event for that instead. I used port 7010 -> 80 for forwarding and sometiemes connection dropped when I should have got data. I fixed it by adding an eevnt and doing yield and now it works (did a lot of testing, before it failed on every 3rd, 4th occasion). I would like to understand better event handling. For example I used httpd.perl in an experiment. I was sending a couple of megs on one conn. and still it was ready to accept more connections. Seems like mltithr but ofcourse it's all events. I don't get it now how does Filter::HTTPD know when to invoke receive event for 1 complete http request ? I guess the scenario is that reading takes place all of the time in small bits and Filters get event is invoked constantly. Only when get event returns [] with one element in it does the success event fire ? Also, I think the philosophy is to have lots of "fast" states so that there is no blocking and if there really needs to be a long blocking sub than you invoke Wheel::Run on it and communicate over events making everything seem fast again. With multithreading you have kernel dividing time as it want's. Here you have subs taking all the time they need. The next event runs after they finish (or sooner if they use $kernel->call). So all the subs must be very fast. What do you think what will be with POE's future when perl becomes multithreading stable. Some people are telling me that python has real multithreading. I wish perl was like that. I hope this goes to the mailing list. I'll catch up with you on #poe sometime soon. Regards, mire
