kyle england
kyle england

Reputation: 118

Public ip socket networking

I have a server object and client object that can connect and communicate with each other.

The client connects using the servers private IP address.

But I would like to be able to use public IP addresses to be able to communicate over the internet.

I get the public ip address using a url www.whatsmyip.com as a url.

I paste this public ip address where needed, but the client is unable to seemingly find the server using the public IP address

Upvotes: 2

Views: 1156

Answers (1)

user207421
user207421

Reputation: 310859

It doesn't have anything to do with code, as long as the server is binding to INADDR_ANY. It has to do with correct port forwarding at the server-side firewall.

Upvotes: 1

Related Questions