Question: A 1 8 - Implement Terminal protocol using Sockets Pre - requisites: Knowledge about system calls, How to read and understand man pages . Good
A Implement Terminal protocol using Sockets
Prerequisites:
Knowledge about system calls, How to read and understand man pages
Good knowledge about TCPIP Protocol
Objective:
The idea of terminal protocol is to implement a protocol using sockets.
Requirements:
Create main server and relay agent server.
The main servers perform different arithmetic operations.
The IP address and Port information of main servers are hard coded in agent server.
The client first contacts the agent, agent then provide client with server information according to the operand.
The client then connects to required server and send the operands.
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
serverplus
INFO: created server socket
LISTENING: plus server is listening
ACCEPTED: accepted a connection
Client data :
Result is
Sending result to client...
client
Enter num:
Enter num:
Enter arithmetic operator:
INFO: Created relay socket
SUCCESS: relay connection successful
SERVER IP
SERVER PORT
INFO: Created server socket
SUCCESS: Server connection successful
RESULT:
Note : You should run different server programs in different tabsTo 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
