package Client; import java.io.*; import java.net.Socket; import java.util.*; import Server.ChatServer; public class ChatClient { public static void main(String[] args) throws IOException { int port = ChatServer.portNum; String host = null; Socket soc; try { soc = new Socket(host, port); } catch (IOException e) { System.err.println("Failed connecting to server: " + host + ":" + port + " (" + e + ")"); return; } ChatClientReader reader = new ChatClientReader(soc); ChatClientWriter writer = new ChatClientWriter(soc); reader.start(); writer.start(); //soc.close(); } }