• 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: mount() from Cocoa App
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mount() from Cocoa App


  • Subject: Re: mount() from Cocoa App
  • From: Jim Luther <email@hidden>
  • Date: Mon, 17 Oct 2005 14:08:58 -0700

On Oct 17, 2005, at 12:09 PM, Dalton Hamilton wrote:

On Oct 17, 2005, at 11:29 AM, Quinn wrote:

At 11:05 +0200 17/10/05, Dalton Hamilton wrote:

I guess my real question is, does anyone have any good advice to
offer before I chose one path over the other???


Run, don't walk, to the Core Services File Manager APIs (FSMountServerVolumeSync/Async in "Files.h").


Thank you very much for your help -- it is working beautifully.  I
decided to use FSMountServerVolumeAsync  instead of the sync version.
The callback function is being called perfectly.   I've done some
error checking and when I enter an IP address for the file server
that is unreachable, the callback doesn't happen for 160 seconds.  Do
you happen to know if there is a way to shorten this timeout???

Thanks again for the excellent suggestion.

There isn't a good way that I know of to get the network file systems to timeout faster. Network file systems attempt to connect to the server using connect(2) (either directly or indirectly) and connect has a 75 second timeout (why 75 seconds? To be reliable). Then why 160 seconds? That depends on the network file system. Some file systems may try to connect multiple times before giving up. Just for fun, I tried mount_webdav. The timeout was exactly 75 seconds since I know that mount_webdav only attempts to connect once.


You might want to preflight your calls to FSMountServerVolume with your own code that checks to see if the server host is reachable (see the Reachability APIs -- SCNetworkCheckReachabilityByAddress and SCNetworkCheckReachabilityByName -- in the System Configuration framework). That way, you can avoid a long timeout when the server isn't reachable.

- Jim (answering since Quinn's probably asleep right now :)
_______________________________________________
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


  • Follow-Ups:
    • Re: mount() from Cocoa App
      • From: Quinn <email@hidden>
  • Prev by Date: Re: connect() timeout after server restarts
  • Next by Date: Re: mount() from Cocoa App
  • Previous by thread: Re: mount() from Cocoa App
  • Next by thread: Re: mount() from Cocoa App
  • Index(es):
    • Date
    • Thread