• 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: NSURL and lingering FTP processes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURL and lingering FTP processes


  • Subject: Re: NSURL and lingering FTP processes
  • From: Daniel Jalkut <email@hidden>
  • Date: Sun, 28 Mar 2004 13:54:39 -0800

Hi Joe - I think the underlying FTP implementation defaults to "keeping connections open" because it helps performance when repeated requests are made to the same server. The CFFTPStream interface published with 10.3 has a property for configuring this behavior on or off.

This property is not published with the NSURL interface to FTP loading, but I think the NSURL will "pass through" property settings that it doesn't understand to to the underlying CFNetwork implementation that is serving the NSURL request.

Try using "setProperty:forKey:" with the key kCFStreamPropertyFTPAttemptPersistentConnection (from CFFTPStream.h). If this works for you, you might request that the property be published (and therefore supported) as part of the NSURL interface. Alternately, you could switch to using CFNetwork directly if you don't need to support pre-10.3 systems.

Daniel

On Mar 25, 2004, at 8:54 AM, Joe Lester wrote:

My app is downloading remote files from an FTP server like so (typed in Mail)...

NSData *data = [url resourceDataUsingCache:NO];

This has been working well for me. The problem is that the ftp processes are staying open on the ftp server until they finally time out after 900 seconds. Here's what it looks like in ftp.log...

Mar 25 10:54:14 OfficeLink-Server ftpd[9710]: User joe timed out after 900 seconds

Is there anything I'm failing to do on the Cocoa API side that could be causing the FTP process to remain open? Or, to ask the question in reverse... Is there anything I can do, at the Cocoa API level, to make the FTP process gracefully shut down immediately after I'm done messaging resourceDataUsingCache?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: NSURL and lingering FTP processes
      • From: Joe Lester <email@hidden>
References: 
 >NSURL and lingering FTP processes (From: Joe Lester <email@hidden>)

  • Prev by Date: RE: Dragging Around A NSScrollView
  • Next by Date: Re: [ANN] Shovel - Third-Party "Software Update"
  • Previous by thread: NSURL and lingering FTP processes
  • Next by thread: Re: NSURL and lingering FTP processes
  • Index(es):
    • Date
    • Thread