TRU Programming Adding Code to Listen for Connections Project

PROJECT REQUIREMENTS

In Part 2 of the project, you must complete the tcp_echo_client.c and tcp_echo_server.c programs. These files can be downloaded from the Assessments Overview section or by using the following link: Project Part 2: Source Code Files. The source modules will compile and run, but the program functionality is incomplete. To complete these programs, you should implement the following requirements:

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
  • Server – add code to listen for connections
  • Server – add code to accept connections from a client
  • Server – add code to receive data from a client connection
  • Server – add code to echo data received by the server back to the client
  • Client – add code to send data to the server
  • Client – add code to receive data from the server
  • Client – print the data received from the server
  • Add additional print statements to your code to provide information about what the client and server programs are doing when they run.
  • COMPILE AND RUN THE ECHO CLIENT AND SERVER PROGRAMS

    You will need to test your programs on two terminals, one terminal for the server and another terminal for the client. The port number and IP address for the client should be specified as command line arguments.

  • # Compile the TCP echo server program $ gcc tcp_echo_server.c -o tcp_echo_server
  • # Run the TCP Echo server program from the command line./tcp_echo_server
  • # Compile the TCP echo client program$ gcc tcp_echo_client.c -o tcp_echo_client
  • # Run the client program from the command line; specify the IP address, port number, and message./tcp_echo_client 127.0.0.1 8899 message
  • If there are no errors in your implementation of the TCP echo program, then tcp_echo_server will print the message sent from tcp_echo_client.

    Still stressed from student homework?
    Get quality assistance from academic writers!

    Order your essay today and save 25% with the discount code LAVENDER