curl-library
Fwd: Re: Close callback
Date: Thu, 6 Mar 2008 13:13:21 +0100
Sorry I wrote under the wrong identity
attached mail follows:
Am Donnerstag, 6. März 2008 12:14:19 schrieb Daniel Stenberg:
> On Thu, 6 Mar 2008, Ingo Krabbe wrote:
> > Is there any way to get called in a callback (like WRITEFUNCTION,
> > READFUNCTION etc) when a fd gets closed ?
>
> Uhm, what fd would get closed? The socket? Why would that help?
>
> > This would help much in integration with several event loop logics in qt,
> > gtk+, .net etc.
>
> Please elaborate on how exactly this would help and what libcurl interface
> you're using!
Following situation: LibcURL in a qt event loop.
- register several easy handles within a multi one
- do a multi_perform
- read out the requested fd_set setup
- setup some QSocketNotifier event handlers for the requested fd events
(read,write,ex)
- in each event handler I can now do a multi perform again.
With the current state of the library, as I know it, I have to provide a
mapping
[fd,type] ---> QSocketNotifier (type is read,write or exception)
since, when I see a change in the fd_set that is easily scanned of course I
need to find the Event handler to be shut down, so that the file descriptor
wouldn't stay in the internal qt select call.
If I had a close callback I could get rid of the fd_set scanning function and,
which is even more important I would get rid of the global [fd,type]->Handler
map.
-- Mit freundlichen Grüßen / kind regards I n g o K r a b b e System Administrator / system administrator _________________________________________________________________________ Elements of Art GmbH http://www.eoa.de An der Eickesmuehle 22 41238 D-Moenchengladbach / Germany fon: +49 (2166) 91567-3418 Registergericht: Moenchengladbach HRB 5855 fax: +49 (2166) 91567-99 Geschaeftsfuehrer: Erik Winterberg, Sebastian LeppertReceived on 2008-03-06