"DummyServer" is a simple TCP server program, written in Java, which can listen on one or more ports for client connections. On each connection it responds with a banner which includes an "ident tag" and the port its listening on, waits to read one line of text from the client, echoes it back and then closes the connection. If the text is the word "QUIT", then the server terminates. It was originally written to assist students in hand-on data networking & Cisco network labs by giving them a target server to access on any desired port on host systems.
Since DummyServer is written in Java, it will run on any system with a suitable Java runtime. If one is not present already on your system, it may be obtained from Sun Microsystems - http://java.sun.com/j2se/. This version was written and tested using Java v1.4.2.
The DummyServer suite comprises the following files:
DummyServer.jar- the main Java JAR archive, which contains all the compiled program class files. This is an executable jar file, which may be run directly if your system knows how to do this, or by using the command:
java -jar DummyServer.jar
Otherwise you'll need one of the following script files as well:
DummyServer- a Unix shell script to run the DummyServer program, with option arguments if desired.
DummyServer.bat- a DOS batch file for running the DummyServer program under Windows in GUI mode.
The source distribution for this program comprises:
DummyServer.java- the source for the main DummyServer program, including main routine, server code and command-line interface handling
DummyGUI.java- the source for the GUI interface to the DummyServer program
Makefile- a Unix Makefile for compiling and packaging the program
manifest.txt- a JAR manifest file naming the main class so that the resulting jar file is executable
README.html- this documentation file.
To install it on your system, provided you have a Java runtime present, you
need only copy the jar file and (if needed) the appropriate script file to a
suitable location on your system. All of the above files are bundled in the
DummyServer.jar JAR file, and can
be extracted using the command:
jar xvf DummyServer.jar
DummyServer can run in both command-line and GUI modes. If run with no arguments (ie the JAR file is directly executed), it will use the GUI interface. This displays a window with text field for entering the desired port number and a server identity tag. Note that the user running the program must be permitted to use the desired port number (ie must have root/administrator privileges on most respectable O/S's to bind to ports less than 1024). The identity tag is typically the name of the system or some other identifer for the server. It is shown to clients when they connect to it. Once these values are entered the server may be started. Multiple servers can be started on different ports.
Once the server is running, the log window lists connections to it from clients.
Alternatively, the DummyServer can be run on the command-line with additional arguments specifying the port and an optional identity_tag thus:
DummyServer port [ident_msg]This starts a single server on the specified port. The log of connections is written to standard error for the program.
The DummyServer application and GUI were written by Lawrie Brown from ADFA, Canberra Australia. Lawrie's code is Copyright © 2005 by Lawrie Brown. Permission to reuse this code as desired is granted, provided due acknowledgement is given of the author and source of the original code.