diff --git a/assignments/src/MV3500Cohort2019JulySeptember/homework1/BoronTcpExample1Telnet1.java b/assignments/src/MV3500Cohort2019JulySeptember/homework1/BoronTcpExample1Telnet1.java index 682081cf4db5c0dc21c10daaf84121368625010a..14c5f7f377bfe14709dabeb93cb73c74a17b9040 100644 --- a/assignments/src/MV3500Cohort2019JulySeptember/homework1/BoronTcpExample1Telnet1.java +++ b/assignments/src/MV3500Cohort2019JulySeptember/homework1/BoronTcpExample1Telnet1.java @@ -2,6 +2,7 @@ package MV3500Cohort2019JulySeptember.homework1; import java.io.*; import java.net.*; +import java.sql.Timestamp; /** * The simplest possible TCP network program. It listens for @@ -52,15 +53,17 @@ public class BoronTcpExample1Telnet1 OutputStream os = clientConnection.getOutputStream(); PrintStream ps = new PrintStream(os); - ps.println("This client response was written by server TcpExample1."); // to remote clientnc - System.out.println("This server response was written by server TcpExample1."); // to server console - + ps.println("This client response was written by Capt. Jonathan Boron."); // to remote clientnc + ps.println("Connection achieved at time: " + new Timestamp(System.currentTimeMillis())); + ps.println(new Timestamp(System.currentTimeMillis())); + System.out.println("This server response was written by Capt. Jonathan Boron."); // to server console + System.out.println("Connection achieved at time: " + new Timestamp(System.currentTimeMillis())); // "flush()" in important in that it forces a write // across what is in fact a slow connection ps.flush(); clientConnection.close(); - System.out.println("TcpExample1 completed successfully."); + System.out.println("Handshake completed successfully."); } catch(IOException e) {