Publicly Host SDL_net Server

Started by
3 comments, last by rpiller 10 years, 4 months ago

I recently learned how to use SDL_net, but I only know how to run the server and client on the same computer. How could I run it through my LAN? Or the internet? Would I need a dedicated server to run the server program publicly?

Advertisement

If you want to simulate how it would/should be in production a dedicated server would most likely be it. All you should have to do is change your client that's connecting to "localhost" (I assume) to connect to the dedicated servers IP address.

The FAQ for this forum does give some pointers on "how do I host my game so that others can run it."

In general, you have to make sure that the machine that runs the server is visible to the greater internet, which generally means port forwarding from a firewall/router (in a residential setting) or some kind of hosted server.

enum Bool { True, False, FileNotFound };
Ah. Thanks. Its a pain to port forward with my router for some reason though. How would I run the server locally?
You ISP most likely gives you a dynamic ip. You can use noir free service to get a host name that has your external ip addressed mapped to it. You run a program on your pc from them that sees any changes to your ip and updates the host name.

You will have to figure out port forwarding though on your router.

This topic is closed to new replies.

Advertisement