I've been programming on a co-op RPG for quite some time now, but my networking side has seen some troubles.
I'm using the lower level serverSocket-Socket way. Everything runs flawless within my own network, however connection over the internet is where the trouble is.
I understand this is due to the firewall. For the last couple weeks I've been browsing the internet, finding things like http tunneling, however never accompanied with a link to some useful info.
My architecture is as follows: a player has the option to make a serverSocket at a specified port. A new thread is created to allow incoming connections up to four. The player that created the serverSocket then connects to self as a client, for programming efficiency.
Clients send messages in text format to the server, provided a message protocol. Those messages are read and interpreted at the server side, and dealt with, such as sending a trade request to the right client socket.
I've looked up RMI, however it doesn't seem to fit my cause, since I don't see how to control all connections, so I can for example but player names and their sockets in a hashtable. If this isn't the case, this would help a great deal :).
If you have any other suggestions, I'd love to hear them. :)
Thanks for reading,