curl-library
Issue with WRITE_FUNCTION callback , multi socket interface.
Date: Mon, 4 Mar 2019 09:42:53 +0530
Hi ,
I am using libcurl for http1.1 feature. And I have a scenario where client
(libcurl) will initiate HTTP request to a server, and server will send
respond when ever their is some event on the server [connection between
client and server will be long lived connection and default READ/WRITE
buffer size if 16k].
That is response can come multiple times, first response with header and
later responses are http body (json format) at any time. So here in this
scenario the write function callback is invoked multiple times for a
response.
If response received is 1k, the libcurl invokes this function multiple
times and does not read 1k buffer from socket in single read. This behavior
is well documented in :
https://curl.haxx.se/libcurl/c/CURLOPT_WRITEFUNCTION.html.
Does libcurl provide any event to application like START_OF_READ when
response is ready and END_OF_READ kind of event which I can make use of for
an http connection ? or any other better solution to this kind of issue
where multiple responses for a single http request is received by client.
Thanks
badari
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-03-04