Although I do now have a question: If a small amount of information (a string such as "ae 0231") needs to be sent, is it degrading the time to send the information if I open and close the socket each time? I have a feeling that I should keep the socket open (especially for chat), but the way I have my code set up right now it only opens the port when I send out commands...
So I was thinking... should each JavaTactics instance have an array of connected computers? This way if a new computer connects to any of the ips it auto gets the other player's ip? This way I can keep sockets open too...
But either way, just *so* happy that it worked.
~>java Requester 220.127.116.11 2004
Connected to 18.104.22.168 in port 2004.
client>JTC: Get offline and call me.
client>SSO: ae 0231
Closed connection to 22.214.171.124 in port 2004.
JTC stands for JavaTacticsChat, and SSO stands for ServerSideOperation (such as moving an actor etc)