My program that I have written works perfectly fine when the client and the server are inside of the same LAN. The problem that I have is that when the server and the client are outside of the same LAN, either just the program freezes or the whole computer freezes.
The server and the client communicate by passing an Object that holds whatever information they need. I have traced the problem to the Object being written. When the program freezes, it freezes right before the Object is written to the server/client. I have tested it on different routers so I think it has to do with either the Object being serialized or writeObject() method just doesn't want to write my Object.
I'm just wondering if there are any special things that I need to consider when networking outside of a LAN because my program works fine inside of a LAN but not outside of one.