Re: Surely someone knows this ?!
site_archiver@lists.apple.com Delivered-To: macnetworkprog@lists.apple.com (There must be some language barrier, Eli - it was a lighthearted comment!) {I'm fairly sure that is not the case, it sends each request straight away.} So, the question is.. and just as you point out, Cheers! _______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (Macnetworkprog@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/macnetworkprog/site_archiver%40lists.... First of all, it's touching that you are demanding an answer from a voluntary list. 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]? 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) (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) (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 This email sent to site_archiver@lists.apple.com
participants (1)
-
J P May