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

example screenshots using NetBeans terminal, plus corresponding javadoc in source

parent 76d13882
No related branches found
No related tags found
No related merge requests found
File added
examples/src/TcpExamples/TcpExample1NetBeansConsoleTelnet.png

91.4 KiB

File added
......@@ -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
......
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