0

I have a mobile multiplayer game that uses the AIR serverSocket class to connect to an AIR server app on a laptop set up as a wifi hotspot.

The requirements have changed and now the server must be remote and accessible over the web.

So the end user connects(via wifi) to the net and accesses the server remotely. Since communication is all TCPIP I assume this presents no problems other than configuring the server to be available via a static IP.

Can anyone tell me a)How to set up a static IP for the sever given the above scenario?

b)How to easily test, can I simply use MAMP and a local server with my AIR server app running or??

Bachalo
  • 103
  • 3

2 Answers2

0

This a fairly involved process but let me elaborate

To do this over the internet you need

  1. You will need to register a domain
  2. Once you have the domain (mygame.com) you need to get a webhost.
  3. In the domain's registrars website, there will be an option to point your domain to their DNS server.

To do it over the internet (using your pc as a server from home)

  1. you need to go to https://www.google.com/search?q=whats+my+ip - it will display 134.33.45.9 for example this is your public address
  2. note the IP address of your connection.
  3. I assume you are using a wireless router with your home network
  4. log into your router
  5. change the router configurations to allow port forwarding
  6. port forwarding will allow your PC to accept connections from a port you specify - for the web or HTTP it's port 80
  7. so the rule will look like this allow connections on port 80 HTTP to (YOUR PC's IP address on your internal network usually 192.168.x.x)
  8. To test this works over the internet - use your laptop to connect to http://134.33.45.9:80 for example using the IP from above step 1
  9. You should see your mamp server's
jc303
  • 126
  • 5
0

To get an static IP you have to ask for it to your ISP (Internet Service Provider). Once it is setup at their side your router will pick it up and then you just need to forward the required ports to you machine. Note , that you router can be configured to pass all internet traffic to only one machine, where there is not need to port forward, or can be set up to pass it to your LAN where you will need to do port forwarding and modify server firewall to allow incoming traffic to the specific ports. On the LAN scenario you will want to modify DHCP setting on your router to reserve some private IP for you local servers.

I would really use some cloud server service as the ones on Amazon (AWS) where you can have until 5 static ip for free and will use multiplayer solutions such http://www.electrotank.com/es5.html or http://www.smartfoxserver.com/

Delcasda
  • 101
  • 2