sali555
21st April 2011, 18:35
hi everyone,
i am writing a network application and have one problem. I have server and two clients. The first client send message to server, when this message comes to server, the server send other message to the second client but I dont know how can I do that.
I have this function, which send data to client
void MainWindow::writeData(QTcpSocket* socket, QByteArray data)
{
socket->write(data);
socket->flush();
}
The first client send message START, the second send "FINISH"
When message FINISH comes, I want to send message HELLO to the client, which sended message START.
sorry about my english
i am writing a network application and have one problem. I have server and two clients. The first client send message to server, when this message comes to server, the server send other message to the second client but I dont know how can I do that.
I have this function, which send data to client
void MainWindow::writeData(QTcpSocket* socket, QByteArray data)
{
socket->write(data);
socket->flush();
}
The first client send message START, the second send "FINISH"
When message FINISH comes, I want to send message HELLO to the client, which sended message START.
sorry about my english