Overview The aim of this exercise is to get you familiar with the socket programming in Linux. (This applies to any other variants of Linux systems). Sockets are endpoints of a two- way communication between two programs running on machines connected via a network. A TCP socket is bound to an IP and port number. To read more on sockets refer to: https://en.wikipedia.org/wiki/Network_socket https://docs.oracle.com/javase/tutorial/networking/sockets/definition.html Structure In this exercise, we create simple client and server programs that send messages to each other and display the messages after receiving them. The client and server will run on the same host (Reptilian machine) and use the same port number. 1. Write a client file that takes the port number as an argument. (ex: ./client 1234) 2. Write a server file that takes the port number as an argument. (ex: ./server 1234) 3. Start the server. (Start the server first as this is the one that’s accepting connections) 4. Open a new Reptilian terminal and start the client (same port that server is listening to) 5. As soon as the client connects, it and the server send their messages to each other. 6. The client and server receive each other’s messages and print them. Note: You might have some issues connecting to localhost, that’s expected, good luck! Expected Output A Client sends a message: “: ”, the server should read that and print it. The Server sends this message: “Welcome to the server running on REPTILIAN”, the client should read that and print it. Submission You will submit the following at the end of this exercise: • A screenshot showing the client being started and its output after connecting (client.png) • A screenshot showing the server being started and its output after connecting (server.png) • Your client source code (client.cpp) • Your server source code (server.cpp) All parts of the exercise must be completed in Reptilian.
COP4600, Ex9:, Networking, solved
[SOLVED] Cop4600 ex9: networking 2
$25
File Name: Cop4600_ex9__networking_2.zip
File Size: 235.5 KB
Only logged in customers who have purchased this product may leave a review.

![[SOLVED] Cop4600 ex9: networking 2](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip.jpg)

![[Solved] COP4600 Ex 6-IO Device Files](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip-1200x1200.jpg)
![[SOLVED] COP 4600 Project 3: Wad File System Read/Write](https://assignmentchef.com/wp-content/uploads/2023/11/Project.mp4_snapshot_00.17_2023.11.11_01.04.56-1200x1048.jpg)
Reviews
There are no reviews yet.