[Interest] problem receiving data from QTcpSocket
aquarian.thunder at gmail.com
Wed Nov 2 13:40:40 CET 2011
I am writing a really simple test application that has to connect to a
remote server, send some data and read the reply back.
I've created a QTcpSocket, and then used the connectToHost() call to
connect to the server.
The connection is successful and I get the connected() signal.
Now, when I write data to the server, I never really get a reply (even
though the write was successful). I don't get an error either.
However I do get a reply if I connect and send the data to the server
through Putty! So I am not sure what I am doing wrong.
The code is really simple:
and then in the slot ( slot is for the connected() signal):
int w = sock->write(
At this point I keep waiting for the readyRead() signal which never comes.
However, a Putty session with the remote server works fine and I can see
the servers reply.
How do I go about debugging this issue? I am really clueless at this point.
Is there a fault with the server?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest