Skip to content
Snippets Groups Projects
Commit c2073213 authored by ljmm1's avatar ljmm1
Browse files

HW2

parent c224271c
No related branches found
No related tags found
No related merge requests found
......@@ -35,13 +35,14 @@ public class McCannServer {
while (true) {
// block until connected to a client
try (Socket clientConnection = serverSocket.accept()) {
try (Socket clientConnection = serverSocket.accept()) {
// Now hook everything up (i.e. set up the streams), Java style:
os = clientConnection.getOutputStream();
ps = new PrintStream(os);
Scanner keyboard = new Scanner(System.in);
ps.println("What is your name?"); // this gets sent back to client!
//tried to add an input but couldn't get it to work
//String message = keyboard.nextLine();
// ps.println(message);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment