| Ortonas (41) | |
| Basically, i have my code for connecting server-client on local network, but how do i make them to connect over different networks? I using udp btw. | |
|
|
|
| ResidentBiscuit (2655) | |
| UDP is connectionless, so they won't connect. Connecting over different networks is just the same as connecting in a LAN. Give it an IP address to connect to and you're set. | |
|
|
|
| Ortonas (41) | |||
|
Okay, so do I get my actual PC's address then? So could somebody else connect. Atm, I am using
But that obviously wont get me what I want. Its gonna be like 192.168.1.xxx. One way to get my address is go through google "Whats my ip", but is there another more approprate way to do it? | |||
|
|
|||
| kbw (5522) | |
|
It's not an application issue, nor a TCP/UDP issue. It's an IP routing/naming issue. If you're on an internal home network and you want to connect to another computer on a different internal home network ... well, that's the problem. Don't go off changing your application or protocol. By and large, if an app works on a local machine and is well behaved, it should work anywhere. That's the power of IP. Well behaved includes: - using configurable addresses - using send/recv in loops to send/receive all data in the buffer http://v2.cplusplus.com/forum/general/63199/#msg342030 | |
|
Last edited on
|
|