diff options
author | Dor Bivas <dor1_b@walla.com> | 2013-12-04 11:39:00 +0200 |
---|---|---|
committer | Dor Bivas <dor1_b@walla.com> | 2013-12-04 11:39:00 +0200 |
commit | f2517d6ea0bbd3f9347ec2dc218ce1bbd629d955 (patch) | |
tree | 0f89ffb85c3f990739993448b4a5fabc1bb67340 | |
parent | b918add674c1a4a9774219662b4d77fa052b38b3 (diff) |
fixing baggs
-rw-r--r-- | src/Client/ChatClient.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/Client/ChatClient.java b/src/Client/ChatClient.java index 47c2736..95f97dc 100644 --- a/src/Client/ChatClient.java +++ b/src/Client/ChatClient.java @@ -4,6 +4,7 @@ import java.net.Socket; + import Server.ChatServer; public class ChatClient @@ -37,16 +38,15 @@ public class ChatClient public boolean connect (String host, int port) { Socket soc; - ChatClient client = new ChatClient(); - + try { soc = new Socket(host, port); ChatClientReader reader = new ChatClientReader(soc); + + reader.setDisplay(ui); - reader.setDisplay(client.ui); - - ChatClientWriter writer = new ChatClientWriter(soc,client); + ChatClientWriter writer = new ChatClientWriter(soc,this); reader.start(); writer.start(); @@ -66,8 +66,7 @@ public class ChatClient client.setNick("dor"); client.setRealname("Dor bivas"); client.ui = new UserInterface(client); - - + //soc.close(); } |