[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] Aync handling & message response
From: |
Christian Grothoff |
Subject: |
Re: [libmicrohttpd] Aync handling & message response |
Date: |
Sun, 9 Sep 2018 12:29:38 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
In this case, MHD would use an eventfd instead of a pipe *if* the
platform supports it (i.e. on GNU/Linux).
On 09/06/2018 08:11 AM, Kunal Ekawde wrote:
> Hi Christian,
>
> Can you please confirm if suspend/resume wont use pipe (lfor IPC)?
> As in manual it's mentioned as:
> "Enables using MHD_suspend_connection and MHD_resume_connection,
> as performing these calls requires some additional pipes to be created,
> and code not using these calls should not pay the cost."
>
> But couldn't see in src code.
> My application is using external epoll w/o any MHD threads.
>
> Thanks,
> Kunal
>
> On Wed, Sep 5, 2018 at 9:22 PM Kunal Ekawde <address@hidden
> <mailto:address@hidden>> wrote:
>
> Thanks Christian, yes I got it done :)
>
> On Wed, Sep 5, 2018 at 3:05 PM Christian Grothoff
> <address@hidden <mailto:address@hidden>> wrote:
>
> Dear Kunal,
>
> Yes, you can do all this, including raw epoll, no threads and
> storing
> connection details in '*cls'. I just don't have an example that
> does
> all this at once ;-)
>
> Happy hacking!
>
> Christian
>
> On 08/27/2018 11:15 AM, Kunal Ekawde wrote:
> > Hi,
> >
> > With ref to:
> >
> https://lists.gnu.org/archive/html/libmicrohttpd/2018-08/msg00015.html
> ,
> > I gone through twister, but looks like this is sync operation.
> The curl
> > operation is performed sync in same thread. I wanted to know
> if there is
> > a way to make it async, so basically on receiving the data
> callback
> > (entire data), we should be able to store the connection
> details (cls ?)
> > so that server can do some other task, like may be fetch from
> DB. When
> > server is ready with response, it should be able to call
> > MHD_queue_response with the stored connection details. When it
> breaks to
> > fetch from DB, it could also handle other incoming requests.
> > Let me know If I'm missing something here or if there is any
> pointers
> > w.r.t use of MHD in this way preferably using raw epoll
> instead of GNUnet.
> >
> > Threading model interested is : Application is single threaded
> with its
> > own epoll, MHD not to create any threads.
> >
> > Thanks,
> > ~Kunal
>
>
>
> --
> ~Kunal
>
>
>
> --
> ~Kunal
0x939E6BE1E29FC3CC.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature