I'm building an application that uses a Socket to connect to a server over TCP. When I'm running the application, I sometimes get disconnected (with or without a "connection reset by peer"-error). It's almost sure that the server didn't disconnect me. After I get disconnected, my internet connection is down (also on another computer behind the router), and I have to reboot my router to get it back working.
Could this have to do with my (NAT)-router? If so, how can I fix this (where do I have to look for)? Is there any way to solve this in the Java-code?