curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Long poll

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 28 May 2020 17:27:05 +0200 (CEST)

On Thu, 28 May 2020, Alan Jones via curl-library wrote:

> I am using libcurl to interface to Microsoft's Exchange Web Services in
> conjunction with gSoap. One of the services, Subscribe for Notifications,
> sends a request for notifications and the connection is left open.
> Thereafter the server sends a 1K HTML message whose body terminates with
> </Envelope> every 45s. To handle this I am using a curl_multi_wait inside a
> loop that terminates when the curl write callback detects the
> trailing </Envelope>. However I am wondering if there is a way I can
> leverage Curl's own parser to detect the complete message itself and only
> call the write callback once?

curl will call the write callback when there's data coming, you can't change
that. It may get called with data once or several times, depending on
conditions.

curl knows when the complete transfer is done, but then it has already
delivered all the data to the callback...

-- 
  / daniel.haxx.se | Commercial curl support up to 24x7 is available!
                   | Private help, bug fixes, support, ports, new features
                   | https://www.wolfssl.com/contact/

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-05-28