Loading
Status: Live
Data communications using c++ programming
Date Posted: 27/02/2021
Category: Computer Science
Due Date: 28/02/2021
Willing to Pay: $15.00
Instruction
For this test, you should use, as a starting point, the source codes available on our course’s Github repository using this link: https://github.com/marceljar/BTN415_Labs/tree/main/test1 PART A – [2.5 marks] Alter the original source codes for client and server so that the client application, and the server application, can keep sending and receiving user defined messages (which might include spaces). Note that they should use the TCP/IP protocol and the IP address 127.0.0.1 (localhost), as well as port 27000. Note that the client and server should be flexible enough to send and receive messagesin any order. Hint: Use threads. There is no need to create a way for the connection to be terminated. PART B – [2.5 marks] Alter the original source code so that your client is flexible enough to allow for the user to choose, using the terminal, an IP address, a port number, as well as the transport method: i.e., either TCP or UDP, to interact with a server (which could be either a TCP server or a UDP server). Note that your code should avoid unnecessary duplicates of lines of code. In other words, write your code in a way to minimize repetition. Answers with a large number of unnecessary lines will lose up to 1.5 marks. Hint: You can test your code by trying to use it to connect to the basic TCP server and the basic UDP server we covered in class. There is no need to create any server-side code. PART C – [2.5 marks] Alter the original source code so that you client is flexible enough to: specify the IP address and port of the server, as well as keep sending and receiving information from the server until it sends a message containing only: "[q]". When this happens, your client application should go back at a state in which the user can interface with a new server. I.e., it should go back at a stage in which the user needs to specify the IP address and port. Like our previous part, avoid unnecessary code repetition. Answers with a large number of unnecessary lines will lose up to 1.5 marks. Hint: You need to close your client socket and recreate it. Also, no need to deal with potential spaces in the user defined messages. You can test this application against the server we covered in lab 3 (source code provided). SUBMISSION INSTRUCTIONS Part A: Submit both the source codes for the client and the server. They should be named: client_a.cpp and server_b.cpp Par B: Submit the source code for the client, which should be named client_b.cpp Part C: Submit the source code for the client, which should be named client_c.cpp
Attached
No File uploaded yet.
Tutor Uploads
No File uploaded yet.
Bidders
4
Average bid
$466.25
Rated 8.91 earned 25566.50 around 785 assignments.
$615.00
Rated 1.0 earned 126.20 around 2 assignments.
$250.00
Rated 9.46 earned 7587.63 around 267 assignments.
$500.00
Rated 9.84 earned 31152.16 around 984 assignments.
$500.00