Objectives

In Project Part 2, you will gain a better understanding of Transmission Control Protocol (TCP) / Internet Protocol (IP), experience using sockets as a communication mechanism, and explore how to use TCP and User Datagram Protocol (UDP) with sockets.

Lets think of an application that sends data from an end host computer system to another computer. A reasonably good way to send data over the Internet is to use a transport layer protocol, such as Transmission Control Protocol (TCP) or User Datagram Protocol (UDP), or a network layer protocol Internet Protocol (IP), not data link layer protocols. (Why?) Here are some questions:

  • Do we really have to develop those protocols in the application? No, we just need to use one of them because they are implemented in the operating system kernels.
  • What protocol, then, do we need to use? TCP, UDP or IP? It depends on our applications.
  • How do we use those protocols in our applications?

Instructions

1. Read the section called Project Part 2: Background Information. You will need this information to complete Part 2 of the project.

2. After you have read and understand the background information, implement the following two programs:

  • Complete UDP echo server and client programs.
  • Complete TCP echo server and client programs.

See file. Background Information.

Requirements for Project Part 2

The messages must be given to the client programs as arguments, not only one argument, from the user. The client programs need to send the messages separately, not at once as one message.

All your programs should print your name and student number on the terminal window.

You need to test your programs on two terminals, one terminal for server and another terminal for client. The necessary port number and IP address should be given from the user as arguments.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.