[Interest] problem receiving data from QTcpSocket

sarvesh saran aquarian.thunder at gmail.com
Wed Nov 2 14:00:21 CET 2011


H

On Wed, Nov 2, 2011 at 6:21 PM, Guido Moonen <info at tngsoftware.nl> wrote:

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

Thank you for your answer.  Its port 110. (sorry for the Typo).



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

\r\n does not help either.



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

I use a terminal one ( there are 5 options in Putty: "raw", "telnet",
"rlogin", "ssh" and "serial"). I always pick "telnet" and it works.



thanks,
Max


> 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/94a05be0/attachment.html>


More information about the Interest mailing list