QTcpsocket telnet connection ...



  • I try to connect a QtcpSocket client to telnet server ..... if launch

    MyQTcpSocket->connectToHost("171.253.11.86", 23);
    

    connection is establish and is valid but I'm not able to write to the server....

    Is normal these (my connection is over ethernet switch to eth0 port from client to eth port in server)...

    Regards
    gfxx


  • Lifetime Qt Champion

    Hi,

    How did you confirm that the connection was established ?



  • Yes .... the server when I disconnect closing my app (tcpsocket run inside a subclass of qthread) show to display the messages:

    serverx: eof from client
    serverx: disconnect from client 1 (my test login).
    

    Regards
    Gfxx


  • Lifetime Qt Champion

    And what are you writing to the server ?



  • mytcpysoket->write("hello passworld loginName\n");

    If write these (whitout \n) whit terminal the server accept my connection end reply my "hello loginName" ....

    in the terminal normally i write:

    telnet ip port<--- with socket i write: mytcpsocket->hostconnection(""xxx.xxx.xx.xx, port");
    ....server response for ok connection.....
    hello passworld loginName<----my login
    hello loginName <---- server response
    

    I try to use wireshark an there is no |n at end string but ?? caracters ... i try to do these .... without success .... the packet send with terminal telnet commad is totally different to QTcpSocket packet send???

    regtards
    Gfxx


  • Lifetime Qt Champion

    You should take a look at the Telnet protocol e.g. here


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.