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. Problem with QTcpSocket version Qt 5.1.0
Forum Update on Monday, May 27th 2025

Problem with QTcpSocket version Qt 5.1.0

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 1.7k 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.
  • A Offline
    A Offline
    aymen090
    wrote on 29 Aug 2013, 17:38 last edited by
    #1

    Hi everybody,

    I have started a QTcpServer for listening like this
    server->listen(QHostAddress::Any,53210)
    and it has start listening correctly
    but, when I connect with Qtcpsocket from another IP (not local)
    with this code
    socket->connectToHost("IP_REMOTE",53210)
    An error has appear (socket Timeout).

    Another information to help, when I connecti with 3G modem (don't use NAT), connection has been establish well.

    Any help?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on 30 Aug 2013, 01:31 last edited by
      #2

      What is the value of IP_REMOTE??

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0
      • A Offline
        A Offline
        aymen090
        wrote on 31 Aug 2013, 17:44 last edited by
        #3

        the public IP of the correspondant for exemple 41.xxx.xx.xx
        I found that the correspond when he open the port (Port forwarding) 53210, the connection it will establish.
        Do you knew how Can I open the port automatically.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          aymen090
          wrote on 4 Sept 2013, 17:42 last edited by
          #4

          No one have solution?

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 4 Sept 2013, 19:25 last edited by
            #5

            Hi,

            You can't open ports like that. It's in the domain of network setup (i.e. firewall modification etc...)

            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
            • A Offline
              A Offline
              aymen090
              wrote on 4 Sept 2013, 20:01 last edited by
              #6

              Are there another solution? Like skype or programs peer to peer, how these programs work?

              1 Reply Last reply
              0

              1/6

              29 Aug 2013, 17:38

              • Login

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