From 4abdc974a799041b856bf77259c42a25cedc5779 Mon Sep 17 00:00:00 2001 From: jonathanboron <jonathanboron@172.20.148.95> Date: Wed, 17 Jul 2019 09:15:59 -0700 Subject: [PATCH] Homework 1 v3 --- .../homework1/BoronTcpExample1Telnet1.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/assignments/src/MV3500Cohort2019JulySeptember/homework1/BoronTcpExample1Telnet1.java b/assignments/src/MV3500Cohort2019JulySeptember/homework1/BoronTcpExample1Telnet1.java index 4ad699e106..9d3bbdb3df 100644 --- a/assignments/src/MV3500Cohort2019JulySeptember/homework1/BoronTcpExample1Telnet1.java +++ b/assignments/src/MV3500Cohort2019JulySeptember/homework1/BoronTcpExample1Telnet1.java @@ -53,11 +53,13 @@ public class BoronTcpExample1Telnet1 OutputStream os = clientConnection.getOutputStream(); PrintStream ps = new PrintStream(os); + Timestamp timestamp = new Timestamp(System.currentTimeMillis()); + 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("Connection achieved at time: " + timestamp); 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())); + System.out.println("Connection achieved at time: " + timestamp); // "flush()" in important in that it forces a write // across what is in fact a slow connection ps.flush(); -- GitLab