SocketWithoutNetworkExample -- communicating
across a socket using the "loopback" address.
This class manages a server socket listening on port 7834, and
its partner class, ClientWithoutNetwork, runs
a client for that server socket.
To see this example in action:
- Compile the Java source file, SocketWithoutNetworkExample.java:
javac SocketWithoutNetworkExample.java
- Run the server socket class in one command-line shell:
java SocketWithoutNetworkExample
- Run the client socket class in a different command-line shell:
java ClientWithoutNetwork
- Run a second client socket after the first one completes:
java ClientWithoutNetwork
The source.