• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Socket timeout issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Socket timeout issue (From: Mitchell Laurren-Ring <email@hidden>)
 >Re: Socket timeout issue (From: "Peter Sichel" <email@hidden>)
 >Re: Socket timeout issue (From: Mitchell Laurren-Ring <email@hidden>)
 >Re: Socket timeout issue (From: "Peter Sichel" <email@hidden>)
 >Re: Socket timeout issue (From: Mitchell Laurren-Ring <email@hidden>)
 >Re: Socket timeout issue (From: Dmitry Dolinsky <email@hidden>)
 >Re: Socket timeout issue (From: Mitchell Laurren-Ring <email@hidden>)
 >Re: Socket timeout issue (From: Dmitry Dolinsky <email@hidden>)

  • Prev by Date: Re: Socket timeout issue
  • Next by Date: Getting SIGHUP in a DO process launched by NSTask
  • Previous by thread: Re: Socket timeout issue
  • Next by thread: Re: Socket timeout issue
  • Index(es):
    • Date
    • Thread