Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Game Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-08-2010, 12:42 AM   #1 (permalink)
Registered Member
 
Join Date: Oct 2010
Posts: 4
gchishti is on a distinguished road
Question wifi data sending problem

Hi, I am using Wifi to give multiplayer functionality, and for sending data I am using NSData to send to the other device. I am using the following code to send

NSData *Data = [NSKeyedArchiver archivedDataWithRootObject:MyNSMutableArray];
[_server sendDataata error:nil];

and while receiving data I convert it back to required NSMutableArray using following statement

NSMutableArray *ReceivedArray = [[NSMutableArray alloc] init];
ReceivedArray = [NSKeyedUnarchiver unarchiveObjectWithData:data];

but It gives the following error if data is more than a limited number of bytes.

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSKeyedUnarchiver initForReadingWithData:]: incomprehensible archive (0x62, 0x70, 0x6c, 0x69, 0x73, 0x74, 0x30, 0x30)'

What I think is that while sending data it removes all bytes that are more than a restricted number of bytes.
I am using the code of this sample project to implement Wifi.
http://bill.dudney.net/roller/objc/e...ver_for_iphone
How can I resolve the problem?
is Wifi limited to send a certain limited bytes or we can set the limit only?
thanks in advance

Last edited by gchishti; 10-08-2010 at 12:50 AM.
gchishti is offline   Reply With Quote
Old 10-08-2010, 08:08 AM   #2 (permalink)
Registered Member
 
Join Date: Oct 2010
Posts: 4
gchishti is on a distinguished road
Default

any one? I could not solve it yet..
if some one is unable to understand my problem i can explain.
gchishti is offline   Reply With Quote
Reply

Bookmarks

Tags
bonjore, wifi, wifi data limit

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 405
11 members and 394 guests
7twenty7, ChrisYates, djohnson, gmarro, hussain1982, Kirkout, Retouchable, skrew88, SLIC, walex, xzoonxoom
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,679
Threads: 94,128
Posts: 402,921
Top Poster: BrianSlick (7,990)
Welcome to our newest member, xzoonxoom
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:08 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0