Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTcpsocket telnet connection ...
Forum Update on Monday, May 27th 2025

QTcpsocket telnet connection ...

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 6.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • gfxxG Offline
    gfxxG Offline
    gfxx
    wrote on last edited by gfxx
    #1

    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

    bkt

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      How did you confirm that the connection was established ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • gfxxG Offline
        gfxxG Offline
        gfxx
        wrote on last edited by gfxx
        #3

        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

        bkt

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          And what are you writing to the server ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • gfxxG Offline
            gfxxG Offline
            gfxx
            wrote on last edited by
            #5

            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

            bkt

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

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

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved