• 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
Distributed Objects, NSFileHandle and file transfer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Distributed Objects, NSFileHandle and file transfer


  • Subject: Distributed Objects, NSFileHandle and file transfer
  • From: Gert Andreas <email@hidden>
  • Date: Wed, 6 Aug 2008 11:07:34 +0200

Hi,
i'm currently working on a client-server-system for transferring filesets to a server and downloading them.


But i'm still not sure about how to realize the communication and especially how to transfer large files.
I'm using dictionaries for transferring the information of the files. But how to transfer the data of each file or the whole set.


Using NSData and sending a file at once doesn't work as you need to allocate too much memory for large files.
So i made an attempt using distributed objects and vending the NSFileHandle from to file on the client side to the server.


- (void)sendFileHandle:(in byref NSFileHandle *)fileHandle;

and the read the file till the end using:
dataToWrite = [fileHandle readDataOfLength:100000];

That works indeed great but i'm wondering if it's a good idea using DOs for transferring files?
Would it be better to use something like AsyncSockets or Input/ Outputstreams?


I'm looking for a solution that uses less memory and provides an easy managemend for the chunks of the files.
Any feedback is highly appreciated.


Thanks,
Gert
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Distributed Objects, NSFileHandle and file transfer
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Using performSelector: on super
  • Next by Date: Re: CGGStackRestore: gstack underflow
  • Previous by thread: Re: autorelease CGImageRef?
  • Next by thread: Re: Distributed Objects, NSFileHandle and file transfer
  • Index(es):
    • Date
    • Thread