So a basic explination of what i'm trying to do is this:
1.Open a server in which multiple clients can join.
2.Clients join the server (From anywhere around the world - Through the internet).
3.Clients can play with eachother (SDL Images that send and receive player_x and player_y values).
I current have this working!
Multiple clients can join and play with eachother.
THEY CANNOT PLAY WITH EACHOTHER AROUND THE WORLD???
The players can play together - This works.. But only on the connection in which the server is on?
I can't ask one of you to play with me while the server is running: It doesn't work.
WHAT I'VE TRIED:
(I know the address is the problem, So that is the code I will be showing.)
server.sin_family=AF_INET; server.sin_addr.s_addr=INADDR_ANY; server.sin_port=htons(2359);
ser.sin_family=AF_INET; ser.sin_port=htons(2359); ser.sin_addr.s_addr=inet_addr("IPv4 Address (From ipconfig)");
Now, I know this isn't the correct info (On the client's code). The IPv4 is not online play. I say this because the Address from "www.whatsmyip.org" seems to STOP my client program from even running. (Windows - Does the whole "Not responding" thing.)
CORRECT ME IF I DID THIS WRONG, PLEASE:
I did some 'Port Forwarding' to get this working Via Internet to everyone whoever wants to play around the world.
So I went in, and put the port forward onto my IPv4 address and made the port to forward the same as in the code, 2359.
I had a friend from somewhere else in the world try to play with me. Didn't work.
Client states that he is not connected (His client).
Server states that he is not connected (My server).
ONLY when the client address is set to the IPv4 address, can anyone play. But that anyone must be connected to MY internet connection.
All help is appreciated!