What I want is to host a Java server (which can query a simple relational database) and my game-client (which should be able to connect to and run methods on the server; do/while loop for threading multiple connections), on my secondary computer. The game jar will be loaded using a simple HTML-file. I’m behind a router, as I only have 1 outgoing IP, which is of course assigned to the router. My secondary computer has a static IP 192.168.1.2. Of course, this will mainly be for testing, until I get a host.
Is this possible? I know about port-forwarding, and as I see it, there shouldn’t be a problem with it. I’m kinda puzzled by the router-interface, though. I can’t find anywhere that says UPnP-forwarding, so I might need a new router.
I found this, though. Does this sound right?
“Virtual Server - Virtual Server is used to allow Internet users access to LAN services.”
It allows me to set the following:
Name:
Private IP: 192.168.1.X
Protocol Type: TCP, UDP or Both
Private Port:
Public Port:
The primary point would be for the game-client to be able to get Player-entities and highscores from the database using the Java-server for querying.
I’ve worked with JDBC and Apache at my school, using just Socket and ServerSocket in the client and server respectively. Would this approach be recommendable? I don’t mind writing the raw SQL since there won’t be many different calls anyway, so I’m in no need for a wrapper at this time. I’m more interested in possible security flaws in this approach.