Skip to content
Snippets Groups Projects
Commit b34a5ce1 authored by Thea Olivia's avatar Thea Olivia
Browse files

finishing runServer()

parent 2d3cff96
No related merge requests found
......@@ -81,10 +81,19 @@ public class Server implements Runnable
streamFromClient = new BufferedReader();
InputStreamReader((fromClient.getInputStream()));
streamToClient
streamToClient = new PrintStream(fromClient.getInputStream());
String str = streamFromClient.readLine();
System.out.println(str);
streamToClient.println("Halo, "+str);
}
} catch (Exception e){
e.printStackTrace();
} finally {
try {
fromClient.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment