libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] http2 suspend/resume


From: Kunal Ekawde
Subject: Re: [libmicrohttpd] http2 suspend/resume
Date: Fri, 4 Jan 2019 23:39:15 +0530

Hi Christian,

I could get multiple streams working with suspend/resume. Took the following approach:
  1. When request is received, saved the stream id at application.
  2. Suspend now would suspend only the stream logically, so the connection is not suspended – no updating epoll fds as earlier, I update the stream as suspended. MHD_suspend_stream() – new API
  3. When the application wants to sends response (current example – after timer exp), it invokes an new API MHD_resume_stream. In here, I update the stream to be resumed and trigger the MDH inter thread communication.
  4. MHD invokes the callback so that response can be queued.
  5. On queuing the rsp and starting its internal epoll, I check for all the streams for that connections were suspended and have to be resumed, if so , update the epoll internal state and do epoll_ctl so that fd can be triggered to send the response.

Please let me know if this sounds logical or there is basic issue with this approach.

Thanks,
Kunal

On Mon, Dec 31, 2018 at 2:18 PM Kunal Ekawde <address@hidden> wrote:
Hi,

I'm currently checking the http2 combo of nghttp2 + MHD provided by https://github.com/maru/libmicrohttpd-http2.

It doesn't support multiple streams with suspend/resume. To try to make it work, I was thinking if following understanding is correct(only if version is http/2):
To suspend, we need to suspend only the stream and resume also for a particular stream. Here, can we keep MHD connection still in non suspended state ? So something like create and add fd's to epoll for each stream and wake up when application triggers resume on the stream. Will the callbacks be affected and way response is queued ?
Any pointers will be appreciated.

Thanks,
~Kunal


--
~Kunal

reply via email to

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