From: Dean M. B. <mik...@gm...> - 2010-11-14 06:51:13
|
On Sat, Nov 13, 2010 at 4:42 PM, qjmann <sou...@gm...> wrote: > > Thank's a lot, I used asynchronous tags, and now "client.get(request)" > call is not blocking progpam's execution. > In my application there will be a huge queue of URLs (from different > hosts, it is just a crawler) and very limited set of requester objects > (app must handle ~100 concurrent connections). 100 concurrent connections is easy to handle. But not with the current implementation of the HTTP client. > > So, next trouble is how to check if client[i] has received the whole > response and disconnected from server ("Connection: close" request > header was used) or not. How to check this? You cannot do that yet now. I might implement a wrapper or a simple check on the response objects to see whether the body part is done. It should be trivial to do but I'm concentrating on the server side. Maybe others on the list might want to implement this for the asynchronous basic_response<Tag> overload where Tag is asynchronous? *hint*. :) > And additionally, how to > pass callback handlers into client (or response maybe?) object? > I have found nothing about this in documentation and in examples also. > These are not possible yet. As I've said earlier, this will be made possible in a later release, potentially 0.9, which will come after 0.8 (scheduled for release next week). HTH -- Dean Michael Berris deanberris.com |