Skip to content
Snippets Groups Projects
Commit 955ed8bc authored by Brutzman, Don's avatar Brutzman, Don
Browse files

improved diagnostics, comments

parent 65cc15b2
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment