Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Conneting to a computer using socket

Conneting to a computer using socket

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminhelpquestion
7 Posts 3 Posters 0 Views 1 Watching
  • 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.
  • B Offline
    B Offline
    bubuzzz
    wrote on last edited by
    #1

    Hi, I am writing a small app to connect 2 computers. When i test the server side right from my computer, it 's ok. But because i am using a shared network with a router, my friends cannot connect to my computer by using my IP (because it is a local ip). Can anyone suggest a way to overcome this problem, please?

    CPalliniC M 2 Replies Last reply
    0
    • B bubuzzz

      Hi, I am writing a small app to connect 2 computers. When i test the server side right from my computer, it 's ok. But because i am using a shared network with a router, my friends cannot connect to my computer by using my IP (because it is a local ip). Can anyone suggest a way to overcome this problem, please?

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      You may configure your router for NAT [^], [^]. :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
      [My articles]

      In testa che avete, signor di Ceprano?

      B 1 Reply Last reply
      0
      • CPalliniC CPallini

        You may configure your router for NAT [^], [^]. :)

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
        [My articles]

        B Offline
        B Offline
        bubuzzz
        wrote on last edited by
        #3

        so, that 's means i have to configure something "manually". Is there any solution by using code? I just wonder how p2p apps can work when 2 comps connected directly to each other and one comp is under a shared network :omg:

        CPalliniC M 2 Replies Last reply
        0
        • B bubuzzz

          so, that 's means i have to configure something "manually". Is there any solution by using code? I just wonder how p2p apps can work when 2 comps connected directly to each other and one comp is under a shared network :omg:

          CPalliniC Offline
          CPalliniC Offline
          CPallini
          wrote on last edited by
          #4

          bubuzzz wrote:

          I just wonder how p2p apps can work when 2 comps connected directly to each other and one comp is under a shared network

          When one of the two peer-to-peer appliacations is inside a private network, you've to configure (manually) the router for NAT. :)

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
          [My articles]

          In testa che avete, signor di Ceprano?

          1 Reply Last reply
          0
          • B bubuzzz

            Hi, I am writing a small app to connect 2 computers. When i test the server side right from my computer, it 's ok. But because i am using a shared network with a router, my friends cannot connect to my computer by using my IP (because it is a local ip). Can anyone suggest a way to overcome this problem, please?

            M Offline
            M Offline
            Moak
            wrote on last edited by
            #5

            Port forwarding is not possible (see router configuration)?

            Webchat in Europe :java: (only 4K)

            B 1 Reply Last reply
            0
            • M Moak

              Port forwarding is not possible (see router configuration)?

              Webchat in Europe :java: (only 4K)

              B Offline
              B Offline
              bubuzzz
              wrote on last edited by
              #6

              yup. That is what i am trying these day. Thanks all for replying me

              1 Reply Last reply
              0
              • B bubuzzz

                so, that 's means i have to configure something "manually". Is there any solution by using code? I just wonder how p2p apps can work when 2 comps connected directly to each other and one comp is under a shared network :omg:

                M Offline
                M Offline
                Moak
                wrote on last edited by
                #7

                bubuzzz wrote:

                so, that 's means i have to configure something "manually". Is there any solution by using code? I just wonder how p2p apps can work when 2 comps connected directly to each other and one comp is under a shared network OMG

                As long as one of the two peers is not firewalled (incoming connections are not blocked), they can make a connection. If both are in a local network without port forwarding it gets much more trickier, but there are still possibilities (as Skype shows). /M

                Webchat in Europe :java: (only 4K)

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups