Hey there i did something like atheist did 2.
I personaly did it with creating a new class wich has as property ConnectedClient or a connected socket or something.(notice i worked with winsock so my own class had a connected winsock class in it) This way you can store anything you like from that user even if you want (while making a game) its position in your screen/world.

Greets