diff --git a/examples/src/TcpExamples/TcpExample1NetBeansConsoleTelnet.pdf b/examples/src/TcpExamples/TcpExample1NetBeansConsoleTelnet.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6da2f6981a6c7ac8b3e745b40c4b22613dca99a4 Binary files /dev/null and b/examples/src/TcpExamples/TcpExample1NetBeansConsoleTelnet.pdf differ diff --git a/examples/src/TcpExamples/TcpExample1NetBeansConsoleTelnet.png b/examples/src/TcpExamples/TcpExample1NetBeansConsoleTelnet.png new file mode 100644 index 0000000000000000000000000000000000000000..371d0175017153c5c87af5ace1b3719d2ce52f46 Binary files /dev/null and b/examples/src/TcpExamples/TcpExample1NetBeansConsoleTelnet.png differ diff --git a/examples/src/TcpExamples/TcpExample1NetBeansConsoleTelnet.vsdx b/examples/src/TcpExamples/TcpExample1NetBeansConsoleTelnet.vsdx new file mode 100644 index 0000000000000000000000000000000000000000..685e64ed571a6804ccdbde3394732ce0fab882b2 Binary files /dev/null and b/examples/src/TcpExamples/TcpExample1NetBeansConsoleTelnet.vsdx differ diff --git a/examples/src/TcpExamples/TcpExample1Telnet.java b/examples/src/TcpExamples/TcpExample1Telnet.java index 8afcd242338b39fb883628709686dfb3fc5ffe5b..40eb3eadab2ce6311e4fd74865eb8ae2ecda3654 100644 --- a/examples/src/TcpExamples/TcpExample1Telnet.java +++ b/examples/src/TcpExamples/TcpExample1Telnet.java @@ -4,33 +4,45 @@ import java.io.*; import java.net.*; /** + * <p> * The simplest possible TCP network program. It listens for * a connection, from telnet (telnet localhost 2317) or a program * you write, which we will do later. Right now the TcpExample simply * writes a string in response to a connection. * - * As a alternative to running the Windows (or other operating system) console, + * <p> + * As an alternative to running the Windows (or other operating system) console, * you can instead run the NetBeans terminal window. If you are on Windows, - * NetBeans is looking for cygwin installation (for unix-like compatibility). - * Details at https://savage.nps.edu/Savage/developers.html#Cygwin - * - * Modifying his program is the basis for Assignment 1. + * NetBeans is looking for cygwin installation (for unix-like compatibility) + * with details at <a href="https://savage.nps.edu/Savage/developers.html#Cygwin" target="blank">Savage Developers Guide: Cygwin</a>. + * Modifying this program is the basis for Assignment 1. + * </p> * + * <p> * Testing the running server program from telnet looks like this: - * + * </p> + * <pre> * it154916:projects mcgredo$ telnet localhost 2317 * Trying ::1... * Connected to localhost. * Escape character is '^]'. * This was written by the server * Connection closed by foreign host. - * + * </pre> + * <p> * Notice that "This was written by the server" matches * what is written by the code below, over the output stream. + * </p> * + * <p> * After this first connection the program below drops out * the bottom of the program, and does not repeat itself. * The program exits. + * </p> + * + * @see <a href="https://savage.nps.edu/Savage/developers.html#Cygwin" target="blank">Savage Developers Guide: Cygwin</a> + * @see <a href="../../../src/TcpExamples/TcpExample1NetBeansConsoleTelnet.png">TcpExample1NetBeansConsoleTelnet.png</a> + * @see <a href="../../../src/TcpExamples/TcpExample1NetBeansConsoleTelnet.pdf">TcpExample1NetBeansConsoleTelnet.pdf</a> * * @author mcgredo * @author brutzman@nps.edu