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. how to communicate between machines using public ip

how to communicate between machines using public ip

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 369 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.
  • S Offline
    S Offline
    sunilpkd
    wrote on 18 Jul 2020, 05:04 last edited by
    #1

    Hi All,
    I would like to get an idea about developing application between 2 machines using their public IP addresses. Is it possible to use Qt network module for the application.I already developed an application to communicate between two machines with their local ip address where both come in the same local network.
    If we can able to use the Qt network module, how about the port number that can be used?
    thanks in advance

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 18 Jul 2020, 06:06 last edited by
      #2

      Hi,

      What issue do you have with that ?
      How do you configure your applications to know about one another ?

      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
      1
      • S Offline
        S Offline
        sunilpkd
        wrote on 18 Jul 2020, 06:34 last edited by
        #3

        Hi,
        thanks for your help.I have created an application based on client/server using QTcpserver and client using QTcpsocket. It is able to send data between when being operated in same network. But when I used the Ip that I got through "what is my ip", it is not connecting?I am new to this networking area.Sorry if I missed any knowledge.
        Is there any settings to be done to communicate through the unique ip of the machine.

        thank you..

        1 Reply Last reply
        0
        • K Offline
          K Offline
          Kent-Dorfman
          wrote on 18 Jul 2020, 06:53 last edited by
          #4

          when you mention private and public IP numbers that tells me the machines are NAT addressed behind firewalls. You can't reach them over the public internet unless you punch port-forwarding holes in the firewalls, or unless you are an eLite HaCkEr., which I doubt, given the nature of the question.

          1 Reply Last reply
          3
          • M Offline
            M Offline
            mrjj
            Lifetime Qt Champion
            wrote on 18 Jul 2020, 21:22 last edited by
            #5

            Hi
            In a network, there is a router with a firewall in front and it blocks
            incoming connections. So when your app tried to talk to another app over internet
            it wont be allowed in.
            One can tell the firewall that its ok for a given port and if traffic comes, then tell it where
            to send the traffic (the ip of the pc running the app)
            This is called port forwarding.

            However, if your app is to be used by other people this is really not an option to ask them to open ports.

            Can you tell us what the app does and what you wish to do ?

            1 Reply Last reply
            2

            1/5

            18 Jul 2020, 05:04

            • Login

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