From 6f1ac87fd99f03dadfd1728c56bd8fc0d8c74710 Mon Sep 17 00:00:00 2001
From: brutzman <brutzman@nps.edu>
Date: Wed, 24 Jan 2018 08:20:34 -0800
Subject: [PATCH] improved diagnostics

---
 projects/TcpExample1/src/tcpexample1/TcpExample.java  | 3 ++-
 projects/TcpExample2/src/tcpexample2/TcpExample2.java | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/projects/TcpExample1/src/tcpexample1/TcpExample.java b/projects/TcpExample1/src/tcpexample1/TcpExample.java
index 410d2e0218..031f9603c2 100644
--- a/projects/TcpExample1/src/tcpexample1/TcpExample.java
+++ b/projects/TcpExample1/src/tcpexample1/TcpExample.java
@@ -48,7 +48,8 @@ public class TcpExample
             OutputStream os = clientConnection.getOutputStream();
             PrintStream ps = new PrintStream(os);
             
-            ps.println("This was written by the server");
+					ps.println("This response was written by server TcpExample1"); // to remote client
+			System.out.println("This response was written by server TcpExample1"); // to server console
             
             // "flush()" in important in that it forces a write 
             // across what is in fact a slow connection
diff --git a/projects/TcpExample2/src/tcpexample2/TcpExample2.java b/projects/TcpExample2/src/tcpexample2/TcpExample2.java
index 8a634edf20..9b69ca5262 100644
--- a/projects/TcpExample2/src/tcpexample2/TcpExample2.java
+++ b/projects/TcpExample2/src/tcpexample2/TcpExample2.java
@@ -42,7 +42,8 @@ public class TcpExample2
                 OutputStream os = clientConnection.getOutputStream();
                 PrintStream ps = new PrintStream(os);
 
-                ps.println("This was written by the server");
+						ps.println("This response was written by server TcpExample2"); // to remote client
+				System.out.println("This response was written by server TcpExample2"); // to server console
                 
                 // Print some information locally about the Socket
                 // connection. This includes the port and IP numbers
-- 
GitLab