TCP client unique identifier?

Discussion in 'iOS Programming' started by boapps, Aug 8, 2009.

  1. boapps macrumors newbie

    Joined:
    Jun 17, 2009
    #1
    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)
     
  2. neoserver macrumors 6502

    Joined:
    Apr 24, 2003
    #2
    [[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.
     

Share This Page