try { socket = new Socket(network, port); in = new BufferedReader(new InputStreamReader(socket.getInputStream())); out = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())); } catch (UnknownHostException uhe) { listener.logerror("Unknown host."); System.exit(1); } catch (IOException ioe) { listener.logerror("IO Exception trying to connect to server."); System.exit(1); }
connect();
	public IRCIO(IRCListener listener, String network, int port) {		this.listener = listener;		this.network = network;		try {			socket = new Socket(network, port);			in = new BufferedReader(new InputStreamReader(socket.getInputStream()));			out = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));		} catch (UnknownHostException uhe) {			listener.logerror("Unknown host.");			System.exit(1);		} catch (IOException ioe) {			listener.logerror("IO Exception trying to connect to server.");			System.exit(1);		}	}