• 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
How do I separate two concatenated archives in an NSData?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I separate two concatenated archives in an NSData?


  • Subject: How do I separate two concatenated archives in an NSData?
  • From: Charles Crowley <email@hidden>
  • Date: Fri, 13 Jan 2006 13:59:09 -0700

I am using sockets to send objects archived in NSData objects. I am using NSFileHandle's writeData: to send the archives and readInBackgroundAndNotify to read them. The problem is that if I send two close together I get only one notification and the NSFileHandleNotificationDataItem object seems to be the two archives concatenated together. When I do unarchiveObjectWithData: on them I get the first one and the error message "*** +[NSUnarchiver unarchiveObjectWithData:]: extra data discarded" and I lose the second one.

Getting them two at a time is fine with me but I'm not sure what a good way would be to separate them so that I can get both of them. Any ideas?

Thanks, Charlie Crowley

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How do I separate two concatenated archives in an NSData?
      • From: Jim Correia <email@hidden>
  • Prev by Date: Re: iCal data access from cocoa application.
  • Next by Date: NSSpellChecker setLanguage:
  • Previous by thread: Re: iCal data access from cocoa application.
  • Next by thread: Re: How do I separate two concatenated archives in an NSData?
  • Index(es):
    • Date
    • Thread