Skip to content
Snippets Groups Projects
Commit 4abdc974 authored by jonathanboron's avatar jonathanboron
Browse files

Homework 1 v3

parent c1bac0c9
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
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