• 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
Re: Ok I'm really lost with the game kit here.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ok I'm really lost with the game kit here.


  • Subject: Re: Ok I'm really lost with the game kit here.
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 8 Feb 2010 09:23:46 -0800

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 (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: Ok I'm really lost with the game kit here.
      • From: Development <email@hidden>
References: 
 >Ok I'm really lost with the game kit here. (From: Development <email@hidden>)

  • Prev by Date: Re: Create a Quicktime-like window
  • Next by Date: Re: using a tableview delegate
  • Previous by thread: Ok I'm really lost with the game kit here.
  • Next by thread: Re: Ok I'm really lost with the game kit here.
  • Index(es):
    • Date
    • Thread