[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users]How to distinguish network error from high delay network when using evhttp?



how to? or what API can I call to get the errno?


2013/8/20 Mark Ellzey <mthomas@xxxxxxxxxx>
On Tue, Aug 20, 2013 at 07:24:24PM +0800, ????????? wrote:
> Hi,
>
> Recently, I write a download client application with libevent, but my
> program can not tell whether the network is crashed (like not connected
> with wire, or NIC disabled) or I'm still downloading data but delay is very
> high and bandwith is very low...
>
> I know when the req arg of the callback of http request is NULL, the
> request is failed, but how can I tell the two situation from each other?
>
> Thanks

Off the top of my head, maybe checking errno would help.


***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.