Objective
There are a number of objectives to this assignment beyond just a simple socket programming assignment. First, if you have not ever programmed sockets before, it is relatively straightforward, but still an effort. It is worthwhile to have everyone on the same page in terms of experience, at least in this respect. Second, it will help you “tune up” your programming skills and prepare you for other upper-division networking courses. Third, because you can use the Internet to look for examples, this assignment will help you see just how many network programming aids are out in the Internet. And finally, having some practical experience will put a lot of the protocol concepts we learn into perspective.
Assignment
The goal of this assignment is to implement a TCP client and server, and a UDP client and server (that’s four different programs all told).
Your TCP or UDP client/server will communicate over the network (same machine using local loop) and exchange data.
The server will start in passive mode listening for a transmission from the client. The client will then start and contact the server (on a given IP address and port number). The client will pass the server a string (eg: “network”) up to 80 characters in length.
String Operation in Server Side: The client will pass the server a string (eg: “network”) up to 100 characters in length.
On receiving a string from a client, the server should: 1) reverse all the characters, and 2) reverse the capitalization of the strings (“network” would
now become “KROWTEN”).
The server should then send the string back to the client. The client will display the received string and exit.
Online Calculator: The client will pass the server a string (example a+b*c/d) with values (example a=10,b=15,c 5 and d 3 etc.)
On receiving data/string from the client the server calculate the value and result will send to client side. The client will display the received result and exit.
43
Turned in
1
Assigned