//@author Rhandi Martin import java.net.*; import java.io.*; public class ClientThread extends Thread { private BufferedReader br; public ClientThread(BufferedReader br) { this.br = br; } //end ctor(BR) public void run() { String input = ""; try { System.out.println("Status: Channel open"); System.out.print("$ "); while((input = br.readLine())!=null) { input = input.trim(); System.out.println(input); System.out.print("$ "); if(input.equals("Goodbye.")) break; } //end while br.close(); } catch(SocketException se) { try { if(br!=null) br.close(); }catch(Exception e2) { //do nothing } //end catch } catch(IOException ioe) { System.err.println("Unable to establish connection to server - Exiting"); } catch(Exception e) { System.err.println("Unable to establish connection to server - Exiting"); } //end t-c block } //end method - void run() } //end class