Quote Originally Posted by quickNitin
Hello everybody,
i have a strange pbm here. I have QTcpServer Which do listening accepting new connections putting data on dialog level. I have fortune client type code which transfers the data to server.
I have few problems here.Major problem is QTcpServer is not reading as fastly as client is writing.
In what way it is not reading as fast as the client is writing? What happens? Are the client and the server running on different machines? Are the machines on a local network or do they communicate through the Internet?


i need guidance on one more issue, Say multiple clients get connected to socket. How i will diffrentiate between the data which i receives from various sockets.
i think above code can cater to multiple clients.
When a client connects to the server, it is given a separate socket on the server side. So you can differenciate clients easily because they are using different sockets.

This line of code does the job:
Qt Code:
  1. tcpSocket=tcpServer->nextPendingConnection();
To copy to clipboard, switch view to plain text mode 

Each client will get its own "tcpSocket".