The C++ program in the directory http://i5.nyu.edu/~mm64/book/src/term0/ (zero, not uppercase O) is a client for this server. It consists of the three source files
You have to read the first two files, but don’t bother looking at the third. These files are analogous to the three source files of the test program on pp. 86–90 of Chapter 1 of the book. To compile the client on i5.nyu.edu,gcc -c term0.c g++ main.C term0.o -lcurses -lsocket -lnsl(with a minus lowercase L before the name of each library).
Launch the server first, simply by visiting this web page. (If you’re reading this, yoursquo;ve already launched the server.) Then launch the client by running
./a.outTo bring the server to life or to the top layer of your desktop, you may to click on it. Then type characters, ending with 'q'.
To run the server again, click on the “reload” button while keeping the “Ctrlrdquo; key depressed. (Without the “Ctrl” key, you will reload the page of HTML but not the applet(s) in it.) If the server is using the same port number as last time, you may have to wait two minutes before the port number becomes available again. Better View Java Console in case any messages appear.