Hi!
I want to close my server socket, but my server
thread is blocked in the accept() call. In my implementation I call close() and a Socket Exception is throwed. Is this the correct way to stop my server?
public void startServer() {
try {
...
socket.accept() ;
...
} catch( SocketException e ) {
e.printStackTrace() ;
}
}
public void stopServer() {
...
socket.close() ;
...
}