code: public void stop()
  	{
  		try
  		{
  			stopping = true;
  			myServerSocket.close();
  			myThread.join();
  		}
  		catch ( IOException | InterruptedException e ) {
  			logger.log(Level.WARNING, "Had unexpected exception during stop", e);
  		}
  	}
docs: Stops the server.