How do I separate two concatenated archives in an NSData?
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