Re: Question about getBytes:length:
Re: Question about getBytes:length:
- Subject: Re: Question about getBytes:length:
- From: Wim Lewis <email@hidden>
- Date: Tue, 24 Nov 2015 10:58:56 -0800
On Nov 23, 2015, at 8:57 PM, Charles Srstka <email@hidden> wrote:
> Is there a possible typo here? It looks like you’re reading in 16 *bytes* of data, and then comparing it against an integer that is 16 *bits* in size. Is that what you meant to do?
Bluetooth has a number of "short form" UUIDs where most of the UUID is fixed and the remainder is assigned by a central authority.
https://www.bluetooth.org/en-us/specification/assigned-numbers/service-discovery
(I'd argue that -compareCBUUIDToInt:UUID2: should probably be making sure that the remaining fourteen bytes have the expected value, and OSReadBigInt16() is probably less likely to break in the future than swap-and-memcmp, but that's all by-the-way.)
_______________________________________________
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