Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

boapps

macrumors newbie
Original poster
Jun 17, 2009
4
0
I'm basing code off the WiTap/TCPServer example, and I'm adding functionality so that if the connection is dropped (if one party exits the app say) when they attempt a reconnect I want to be able to identify the client as being the same client from before and not a new client.

Is there some unique name/id string the client presents when connecting that I could use on the server reliably for identification?

Ideally I want to grab this as early as possible, like in
static void TCPServerAcceptCallBack(CFSocketRef socket, CFSocketCallBackType type, CFDataRef address, const void *data, void *info)
 
[[UIDevice currentDevice] uniqueIdentifier]

This will return the UUID of the device. It is unique per device so you should be able to use that as a method of identifying your clients.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.