curl-library
Re: How to identify graceful disconnection by remote peer while using multi-interface
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 11 Feb 2012 22:24:07 +0100 (CET)
Date: Sat, 11 Feb 2012 22:24:07 +0100 (CET)
On Wed, 8 Feb 2012, ajil koshy wrote:
> I would like to know on the client side, what is the right way to identify
> that the remote peer has disconnected gracefully i.e. closed the TCP
> connection?
libcurl informs when the request/transfer is complete, it doesn't tell you
when the TCP connection is closed.
> I would expect that the number of running easy handles to hit zero if peer
> disconnects but this doesn't happen.
It should, yes. If it doesn't, can you elaborate with more details?
The absolutely certain way to detect the completion of a transfer is however
to run curl_multi_info_read().
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2012-02-11