Hi
How to use the socketDescriptor to identify the clients currently connected to threaded server.
thread is created when any client is connected to the server..
void FortuneServer::incomingConnection(int socketDescriptor)
{
FortuneThread *thread = new FortuneThread(socketDescriptor);
..
thread->start();
}
... in run()
{
set the socket Descriptor for the tcpSocket..
connect(this->tcpSocket, SIGNAL(readyRead()), this, SLOT(ready1), Qt::UniqueConnection);
}
ready1()
{
read the request from the clients & serve....)
}
need to write a function which sends some information to all the connected clients...
how to do this..
Thanks
Bookmarks