Re: Socket timeout issue
Re: Socket timeout issue
- Subject: Re: Socket timeout issue
- From: Allan Nathanson <email@hidden>
- Date: Fri, 7 Sep 2007 15:18:55 -0400
If you have an open socket you can use getsockname() and getpeername()
to get the local and remote addresses to pass to
SCNetworkReachabilityCreateWithAddressPair.
- Allan
On Sep 7, 2007, at 3:10 PM, Dmitry Dolinsky wrote:
My situation is a little more complicated (among other things I
don't have a convenient access to the local interface being used, so
I can't use SCNetworkReachabilityCreateWithAddressPair). But if
reachablity API approach appeals to you, I expect that specifying
local interface in the pair should work (i.e. you'll be notified
when host is not reachable from interface you've connected from).
--Dmitry
On Sep 7, 2007, at 11:40 AM, Mitchell Laurren-Ring wrote:
On Sep 7, 2007, at 11:17 AM, Dmitry Dolinsky wrote:
Well, it does not say anything about timeouts but I suppose it's a
hint that things are screwed up badly? In any case, that same
section has code sample code check explicitly if given socket is
stale. Personally I have not used this technique. I did something
along the lines of what Peter suggested using newer reachability
APIs.
Thanks, Dmitry.
I tried reachability, but the destination address is, in fact,
reachable. It just isn't reachable on the old interface. Are you
using SCNetworkReachabilityCreateWithAddressPair to create your
SCNetworkReachabilityRef?
-Mick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden