To send a message to all clients, you'll need to keep a list of all connected clients.
Why do you want to use threads? Are the clients/server synchronous (blocking) or asynchronous (non-blocking)?
If you do not need synchronous connections, then do not use threads, just keep a list of the client sockets.
Edit:
Ohh... and do not add this line:
connect(this->tcpSocket, SIGNAL(readyRead()), this, SLOT(ready1), Qt::UniqueConnection);
in the run() function of a thread!
Add it to the constructor of your thread, or a function that sets the socket for that thread.
Bookmarks