Can MCPeerID be used as a key in a dictionary?
Can MCPeerID be used as a key in a dictionary?
- Subject: Can MCPeerID be used as a key in a dictionary?
- From: Rick Mann <email@hidden>
- Date: Thu, 22 May 2014 18:33:55 -0700
I sent this to Cocoa-dev, but realize it might be better here. Sorry for those on the other list.
---
Is MCPeerID usable as a key? It can be used as a key, I've verified that, but will I only ever get the same instance for a specific peer, even after disconnecting and re-connecting? If the instances are different, are the -hash and -equals: methods properly overridden?
If not, how can I map peers to data structures in my code? Should each peer generate a UUID that remains constant for the life of the app on that device, and send that over during connection?
Thanks!
--
Rick
_______________________________________________
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