• 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: Surely someone knows this ?!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Surely someone knows this ?!


  • Subject: Re: Surely someone knows this ?!
  • From: J P May <email@hidden>
  • Date: Tue, 30 Mar 2010 10:01:09 +0200

First of all, it's touching that you are demanding an answer from a voluntary list.
(There must be some language barrier, Eli - it was a lighthearted comment!)


Are you asking how much data gamekit wraps your data in when it sends it over bluetooth?


It would be good to know that, as it would partially answer the question. For example, if there is 100 bytes of wrapper, it would make no performance difference whether your message is 1 byte, or 2 bytes. However if the wrapper is only a byte or two, there would be a performance difference between messages of 1 bytes versus messages of 2 bytes.


Or does the API enforce some minimum amount of data to send [as in, you must send it at least 10 bytes before it actually sends the data over bluetooth]?

{I'm fairly sure that is not the case, it sends each request straight away.}




Or something else?

When one sends data via the game kit, you make some data:
NSData * daty = [NSData dataWithBytes:(float)3.14159265 length:sizeof(float)];
which could be either short or long. I guess that example is a float, so that's 4 bytes,
daty = [stringy dataUsingEncoding: NSASCIIStringEncoding];
there's a string (could be long, or - perhaps - just a byte)


you then send off the data..
[session sendData:daty toPeers:[NSArray arrayWithObject:joey] withDataMode:GKSendDataUnreliable error:nil];



If you are sending such communications frequently, then (perhaps??) the length of the data matters.


In fact, can you send just one byte? Or, is "16 bytes" or something the minimum anyway, so you're wasting your time slimming down your protocol to one byte?

(And exactly as you say, how big's the overhead? if the minimum is indeed say 16 bytes, it is pointless worrying if the overhead is 100s bytes .. you could send 16, 17 or 18 and it would make no difference performance wise.)

Perhaps you can send less than a byte? (if the overhead is trivial, that would be fast)

So, the question is..

(a) what's the smallest it sends anyway? (Thus: if the answer is say 4 bytes, it is pointless slimming your protocol down to 3 bits. use the full four bytes)

and just as you point out,

(b) what's the overhead per fedex? if the overhead is 20 or 30 bytes, it is pointless worrying about whether the message is 1 versus 2 bytes.


It would seem to be a very basic question about gamekit-with-bluetooth - perhaps there's a section of doco. somewhere and I just missed it? googled nuthin




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


References: 
 >Surely someone knows this ?! (From: J P May <email@hidden>)
 >Re: Surely someone knows this ?! (From: Eli Bach <email@hidden>)

  • Prev by Date: Re: Surely someone knows this ?!
  • Next by Date: Re: Surely someone knows this ?!
  • Previous by thread: Re: Surely someone knows this ?!
  • Next by thread: Re: Surely someone knows this ?!
  • Index(es):
    • Date
    • Thread