On the server you have:
Qt Code:
QList<QTcpSocket*> connections;To copy to clipboard, switch view to plain text mode
so pretty much you just need to make an array of usernames which is indexed by the socket ID's in the list.
whenever the list changes because other users connected, you would need to make the server send the list to all of the clients because only the server is aware of all the client connections.
Bookmarks