COMM 3271 Programming Running the Client and Server Programs Project – Description
This is Part 1 of a project consisting of four parts. Part 1 of the project is worth 6% of your final course grade. Refer to your Suggested Schedule to confirm the suggested due date for Part 1 of the project. Consult your Open Learning Faculty Member if you have any questions about the project.
GETTING STARTED
Make sure you have read the document entitled “Project Work: Getting Started.” This document provides a brief introduction to the C programming language and describes the similarities and differences between C and Java. As well, the document includes two practice exercises. In these practice exercises, you will learn to print messages, and investigate how to manipulate simple files using the C programming language.
Make sure that you have completed the practice exercises:
Code and run the program welcome.c
Code and run the program file_copy.c
REFERENCES—THE C PROGRAMMING LANGUAGE
Kerninghan, B., & Ritchie, D. (1988). The C programming language (2nd ed.) [Digital book]. Prentice Hall Software Series.
Tutorials Point. (2018). C tutorial [Educational tutorial]. https://www.tutorialspoint.com/cprogramming/index….
SUGGESTED READING
It is suggested that you read the following sections found in Chapter 10: Application Layer of your textbook:
Section 10.5.1: Data Structure for Socket
Section 10.5.2: Header Files
Section 10.5.3: Iterative Communication using UDP
CLIENT-SERVER PROGRAMMING
In a client-server paradigm, communication is between two running programs— a client and a server. A client program initiates the communication through sending a request. The server program, which runs continuously, waits to receive communications from a client. Therefore, the server program must be started before the client program is started.
Figure 1: Client-Server Architecture
In Part 1 of the project, you will work with simple client and server programs that have been developed for you using the C programming language. These programs implement what is termed a “time server.” The time server uses socket programming and communicates using User Datagram Protocol (UDP). This is a simple example of network programming.
UDP TIME CLIENT
The user will specify the IP address and port 8899 as command-line parameters.
The client program will create a socket using the IP address and port number specified on the command line.
The client will send a time request to the server using the sendto() function.
The client will receive the current time from the server via the recvfrom() function.
The client will exit.
UDP TIME SERVER
The server program will create a socket using the default IP address and port 8899.
The server will bind the socket to port 8899.
The server will receive a time request from the client via the recvfrom() function.
The server will send the current time to the client using the sendto() function.
The server will exit.
COMPILE AND RUN THE CLIENT AND SERVER PROGRAMS
The source code files for this part of the project are udp-time-client.c and udp-time-server.c. These files can be downloaded from the Assessments Overview section or by using the following link: Project Part 1: Source Code Files
NoteLinux (and UNIX) commands and program names are case sensitive!
# Compile the UDP server program
gcc udp-time-server.c -o server
# Run the program server program from the command line
./server
# Compile the UDP client program
gcc udp-time-client.c -o client
# Run the client program from the command line; specify the IP address and port number
./client 127.0.0.1 8899
The post COMM 3271 Programming Running the Client and Server Programs Project first appeared on .