Question: A 1 8 - Implement Terminal protocol using Sockets Pre - requisites: Knowledge about system calls, How to read and understand man pages . Good

A18- Implement Terminal protocol using Sockets
Pre-requisites:
Knowledge about system calls, How to read and understand man pages.
Good knowledge about TCP/IP Protocol
Objective:
The idea of terminal protocol is to implement a protocol using sockets.
Requirements:
1. Create 5 main server and 1 relay agent server.
2. The 5 main servers perform 5 different arithmetic operations.
3. The IP address and Port information of main servers are hard coded in agent server.
4. The client first contacts the agent, agent then provide client with server information according to the operand.
5. The client then connects to required server and send the operands.
6. The server performs the operation and send the result to the client, which prints it on console.
Sample output:
./relay
INFO: created relay socket
LISTENING: relay server is listening
.............
ACCEPTED: relay server accepted connection
./server_plus
INFO: created server socket
LISTENING: plus server is listening
ACCEPTED: accepted a connection
Client data : 1020+
Result is 30
Sending result to client...
./client
Enter num1: 10
Enter num2: 20
Enter arithmetic operator: +
INFO: Created relay socket
SUCCESS: relay connection successful
SERVER IP 127.0.0.1
SERVER PORT 6000
INFO: Created server socket
SUCCESS: Server connection successful
RESULT: 30
Note : You should run 5 different server programs in 5 different tabs(To perform different Arithmetic Operation) using c program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!