The basic funcationlity you will implement is a client and server that communicate over the Internet. The server is essentially an echo server but with some additional functionality. Instead of simply echoing the string it receives, the server returns a string with all upper case letters replaced by lower case letters and every space changed to a `.'. See below for an example.
The server will receive a text string of up to 80 characters length. The server is expected to run on one machine and wait for requests. Your client code will contact the server using its host address (IP host or address and port number) and pass it a string. The server will then change this string and send it back to the client. The client will display the received string and exit.
-----------------------------------------------------------------------------
Then you ran a client on a machine (blondie in the example) using the following arguments:
-----------------------------------------------------------------------------
Your task is to write client and server programs in C {\it and} in Java using UDP {\it and} TCP. You will end up writing (and turning in) 8 different programs:
1- Server in C using UDP (file name to turn
in : server-c-udp.c)
2- Client in C using UDP
( file name to turn in : client-c-udp.c)
3- Server in C using TCP
( file name to turn in : server-c-tcp.c)
4- Client in C using TCP
(file name to turn in : client-c-tcp.c)
5- Server in Java using UDP (file name to turn
in : server_java_udp.java)
6- Client in Java using UDP
(file name to turn in : client_java_udp.java)
7- Server in Java using TCP
(file name to turn in : server_java_tcp.java)
8- Client in Java using TCP
(file name to turn in : client_java_tcp.java)
You will be turning in 8 (and only 8--no header files... NOTHING else) files as named above. Your server should not output anything (status, debugging messages, etc.) and your client should have the exact same interface as given in the above example. (Code will be run against an automated checker... any deviation (e.g. printing additional messages, etc.) will be counted as incorrect.
In order to compile your C code, use the following commands as a guide:
To compile your Java code, use the following commands as a guide:
ANOTHER NOTE: It is highly recommended that you use the CSIL machines to do this assignment. All of the tools you will need are available there; it significantly improves our ability to help you if you have problems; and it ensures that if your programs work there, they will work when we grade them.
In addition to correctness, part of your grade will depend on how well your code is written and documented. NOTE: good code/documentation does not imply that more is better. The goal is to be efficient, elegant and succinct!