[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] How to get fd numbers used by library

From: Christian Grothoff
Subject: Re: [libmicrohttpd] How to get fd numbers used by library
Date: Mon, 30 Jun 2014 17:50:55 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.6.0

On 06/30/2014 05:07 PM, Filip Svoboda - Netajo s.r.o. wrote:
> Hello,
> I need to implement external poll() in my application using
> libmicrohttpd and I didn't find way to get out all file descriptor
> numbers used by the library.. I Know function:
> MHD_get_fdset();
> but it seems impossible to get out fd numbers from fd_set structure.

You can iterate over FDs zero to 'max' and test for each using

> Is the only solution to call select() after my main poll() ?

If you want to use 'poll()' instead of 'select()', you might want to
use _WITH_EPOLL-mode for MHD and just grab the epoll-FD from MHD and add
that one to your 'poll()' set.

Happy hacking!


Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]