On Feb 7, 2010, at 9:33 PM, Development wrote:

>               [session sendData:[NSData dataWithBytes:localPacket.data 
> length:sizeof(localPacket.data)+sizeof(int)] toPeers:[NSArray 
> arrayWithObject:peerID]

The size is wrong. You're computing the size of the packet struct, not the data 
it points to. (In fact, it looks like there's no way to determine the length of 
the data a packet points to since it doesn't have a 'size' field.)

Also, if you were expecting this to send the 'index' field, it won't; it just 
sends the data field.

If you have an image in an NSData, why not just send that NSData object?

—Jens_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to