curl-library
RE: Supporting HTTP/2 PINGs
Date: Tue, 30 May 2017 17:38:32 +0200 (CEST)
On Tue, 30 May 2017, Max Dymond wrote:
> To solve the first problem (receiving a PING frame when it's not expected),
> would it be reasonable to borrow the existing approach of RTSP?
> - Add a flag to handlers which have special handling for determining the
> death of a connection
> - Add this flag to RTSP and HTTP/2.
> - Add a callback function to handlers which can be called to determine
> whether a connection is dead or not
Sounds good!
I think the dedicated function for that protocol should be written possible to
get called (repeatedly, until told it is done as the function needs to be
non-blocking) when the connection is found "in need of attention.". That
attention can then be to either respond to for eample a HTTP/2 ping or just
figure out that the connection is dead and close it. The latter, simpler,
functionality could be set for basically all TCP based protocols.
> And then to fix the HTTP/2 issue (probably):
> - Add a callback function for HTTP/2 based off Curl_rtsp_connisdead
The HTTP/2 would need to figure out if there's ping to handle and then handle
it. I can even imagine that someone might come up with a suggestion that
libcurl should be able to initiate such HTTP/2 pings in to keep connections
alive... but we can cross that bridge once responding to ping works. =)
> Would this be unnecessary work if a connection manager is introduced?
No, I think this is protocol and connection handling that we want, no matter
what else and more we might do.
-- / daniel.haxx.se ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2017-05-30