Code example for UnknownHostException

Methods: getMessage

0
			ClientRunnable runnable = new ClientRunnable(clientSocket);
			 
			Thread newThread = new Thread(runnable);
			newThread.start();
		} catch (UnknownHostException e) {
			System.err.println("UnknownHostException: "+e.getMessage());
			System.exit(-1);
		} catch (IOException e) {
			System.err.println("IOException: "+e.getMessage());
			System.exit(-1);
		} 
	} 
	 
	public static void disconnect() { 
		try { 
			if(clientSocket != null) {
				clientSocket.close();
			} 
		} catch (IOException e) {
			System.err.println("IOException: "+e.getMessage());
			System.exit(-1);