title: C++ sockets: communication between PCs over internet
body: <p>I'm writing a program on Windows using winsocks that can send messages to another computer. The client connects with the server in the other computer and begin exchanging data.</p>
  
  <p>It works fine on my local network using local addresses(192.168.1.*), but I can't communicate with public addresses (216.185.45.129); not even my own. I can successfully connect to a website on port 80, but not to my laptop at home using its public IP address, regardless of what ports I use (unreserved ports). </p>
  
  <p><strong>So I did research online</strong> and the only solution that seems to work is port forwarding.</p>
  
  <p>-But is there absolutely no other way to achieve this?</p>
  
  <p>-How do other programs like Teamviewer connect to other computers on the network then?</p>
  
  <p>-Is there an already open but typically unused port that I can use?</p>
  
  <p>-At the very least, can I forward the ports on <em>my</em> router but <strong>not</strong> have the client do anything? Or maybe have my program forward the ports automatically.</p>