diff --git a/projects/TcpExample1/src/tcpexample1/TcpExample.java b/projects/TcpExample1/src/tcpexample1/TcpExample.java index 410d2e021854751380412431b81477f3e872c57f..031f9603c2eb5ee1fa11219645c61c479c4c5177 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 8a634edf20d1e8e5a275c5fbcdb989ceeb6b0ea1..9b69ca5262d9771b79398a784450271de8799a9a 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