Index of /course/com1770/parent/NOTES/SOCKET-EXAMPLE/Java

[ICO]NameLast modifiedSizeDescription

[DIR]Parent Directory  -  
[   ]Client.class23-Apr-2003 18:57 1.5K 
[TXT]Client.java23-Apr-2003 18:57 1.3K 
[   ]Makefile23-Apr-2003 19:08 338  
[TXT]README.html23-Apr-2003 19:03 1.8K 
[TXT]README.txt23-Apr-2003 19:04 1.4K 
[   ]Server.class23-Apr-2003 18:57 789  
[TXT]Server.java23-Apr-2003 18:57 4.2K 
[   ]ServerConnection.class23-Apr-2003 18:57 2.6K 

Java Exercise 13 WARNING: Do not leave the java Server program running. It allows the client to execute arbitrary commands in your account.

Java Exercise 13


Simple Server/Client java applications to demonstrate connectivity.


Choose an arbritrary port number (preferably higher than 1023), and use it as the portnr parameter in the following procedure...
1. Start the server app with "java Server portnr"
2. Start client app in another window with "java Client portnr"
The client's port number have to match that of the server in order for the client to connect to it. Several clients can connect to the same running server at the same time. Try it with different terminal windows!
The following command/request to the server from the client side are available:
INFO - Gives a short reply
ID - Identifies the client sending this request
EXEC commandline - Executes the commandline in your system e.g. "EXEC ls" will display the current directory in a Unix environment. The commandline might also be any program you wish to start remotely.
quit/exit - disconnects the client from the server and quits client app

Java source code:

Java compiled classes:


Back to Physics Simulation Personal Course Page