From 955ed8bc77991e73beeb79dbfe0dd42587930ad6 Mon Sep 17 00:00:00 2001 From: brutzman <brutzman@nps.edu> Date: Mon, 12 Feb 2018 15:44:02 -0800 Subject: [PATCH] improved diagnostics, comments --- .../TcpExample3/Server/TcpServer/src/tcpserver/TcpServer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/TcpExample3/Server/TcpServer/src/tcpserver/TcpServer.java b/projects/TcpExample3/Server/TcpServer/src/tcpserver/TcpServer.java index 537249d4e6..547ad93bd0 100644 --- a/projects/TcpExample3/Server/TcpServer/src/tcpserver/TcpServer.java +++ b/projects/TcpExample3/Server/TcpServer/src/tcpserver/TcpServer.java @@ -38,7 +38,7 @@ public class TcpServer // Stop the program somewhere else. while(true) { - Socket clientConnection = serverSocket.accept(); + Socket clientConnection = serverSocket.accept(); // block until connected OutputStream os = clientConnection.getOutputStream(); PrintStream ps = new PrintStream(os); @@ -70,7 +70,7 @@ public class TcpServer // a while after the client has stopped needing this // connection. Close() explicitly ends the connection. ps.flush(); - clientConnection.close(); + clientConnection.close(); // like it or not, you're outta here! } } catch(Exception e) -- GitLab