Skip to content
Snippets Groups Projects
Commit b420129e authored by Oblak, William (Maj)'s avatar Oblak, William (Maj)
Browse files

Server and Client Talking

parent 5681c7e6
No related branches found
No related tags found
No related merge requests found
......@@ -81,7 +81,7 @@ public class Assignment1Client
}
catch (IOException | InterruptedException e)
{
System.err.println("Problem with " + TcpExample3Client.class.getName() + " networking:"); // describe what is happening
System.err.println("Problem with " + Assignment1Client.class.getName() + " networking:"); // describe what is happening
System.err.println("Error: " + e);
// Provide more helpful information to user if exception occurs due to running twice at one time
......@@ -98,7 +98,7 @@ public class Assignment1Client
// program exit: tell somebody about that happening. Likely cause: server drops connection.
System.out.println();
System.out.println(TcpExample3Client.class.getName() + " exit");
System.out.println(Assignment1Client.class.getName() + " exit");
}
}
}
......@@ -83,7 +83,7 @@ public class Assignmnet1Server
// Socket pair: (( /0:0:0:0:0:0:0:1, 2317 ), ( /0:0:0:0:0:0:0:1, 54881 ))
// Why is the first IP/port the same, while the second set has different ports?
System.out.println(TcpExample3Server.class.getName() + " socket pair showing host name, address, port:");
System.out.println(Assignmnet1Server.class.getName() + " socket pair showing host name, address, port:");
System.out.println(" (( " +
localAddress.getHostName() + "=" + localAddress.getHostAddress() + ", " + localPort + " ), ( " +
remoteAddress.getHostName() + "=" + remoteAddress.getHostAddress() + ", " + remotePort + " ))");
......@@ -101,7 +101,7 @@ public class Assignmnet1Server
}
}
} catch (IOException e) {
System.err.println("Problem with " + TcpExample3Server.class.getName() + " networking: " + e);
System.err.println("Problem with " + Assignmnet1Server.class.getName() + " networking: " + e);
// Provide more helpful information to user if exception occurs due to running twice at one time
if (e instanceof java.net.BindException) {
......
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