[Interest] problem receiving data from QTcpSocket

Guido Moonen info at TNGSoftware.nl
Wed Nov 2 13:51:49 CET 2011


Hi,

Which protocol are you using to communicate on this port? I cannot find the official use for port 114.

But I would think it needs "windows" enters ("\r\n") instead of just the normal "\n"

And if this does not help do you use a raw socket in putty or a terminal one?

With kind regards,
  Guido Moonen

TNG Software
van den Hummelstraat 34
5175 CM Loon op Zand
info at TNGSoftware.nl
06-26912345


On Nov 2, 2011, at 13:40 , sarvesh saran wrote:

> Hi!
> 
> 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:
> 
> sock->connectToHost("<some_host>.com",114,QIODevice::ReadWrite);
> 
> and then in the slot ( slot is for the connected() signal):
> 
> int w = sock->write("b_action=check;b_version=something;b_device=TestDevice\n");
> 
> 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?
> 
> thanks,
> max.
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20111102/817d06b1/attachment.html>


More information about the Interest mailing list