SFML community forums

Help => Network => Topic started by: C_Worm on April 13, 2019, 11:15:57 am

Title: Connection with getPublicAdress()
Post by: C_Worm on April 13, 2019, 11:15:57 am
I have two computers at Home which has the same public IP-adress.
The computers have diffrenet local IP’s.

Is it possile to send/receive using the public adress or must one use the local adress?

using the local adress works because i’ve tested it but when i change to the public adress, the server/client communication doesn’t work.

The program i’ve coded is just at simple testing program using UdpSockets nothing fancy.
Title: Re: Connection with getPublicAdress()
Post by: eXpl0it3r on April 13, 2019, 02:30:54 pm
You may want to spend some time reading up on general networking topics (TCP/IP/UDP/NAT/etc).

When client and server are both on the same LAN it doesn't make sense to use public IPs.
You can't address the two different PCs with the same IP and same port. If you have different ports, you can configure your router's NAT to port-forward to either LAN IP.
Title: Re: Connection with getPublicAdress()
Post by: C_Worm on April 13, 2019, 11:19:35 pm
Allright, thanks! :)