Hi,
I have two clients which are connected to a listener. My clients are QTCPSockets and my listener is QTCPServer.
When new connection arrived, I send a message to clients just for test purpose and it's working.
What I want to do is a simple client messaging. i.e. one client send message to another and vice versa. But whenever I write a block from client to another, the problem occurs - that no message is sent to receiver client. My writing policy does not involve Listener. I simply
Qt Code:
class Client // assume it's sender client object { ... QByteArray data; data.append("Hello"); int n = clientReceiver->write(data); emit clientReceiver->readyRead(); ... }To copy to clipboard, switch view to plain text mode
By the way I checked the documentation and I encountered the following sentence "Note for developers implementing classes derived from QIODevice: you should always emit readyRead() when new data has arrived...". I also emitted readyRead as you see above.
What is the deal here?
Bookmarks