Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Introduction: This project will require you to demonstrate proficiency in programming using TCP/IP sockets by writing both a client program and a server program to

Introduction: This project will require you to demonstrate proficiency in programming using TCP/IP sockets by writing both a client program and a server program to provide Roman numeral to Arabic number translation. This system will be provided using a connectionless transport protocol. To do this successfully, you will need to leverage an understanding of the network socket API which we covered in lecture 4. The networking code for your solution may be written in either C, Python or Java however it must run on unix1.its.albany.edu (and, of course, unix2.its which are the hosts where it will be tested).

image text in transcribed

The Client You will write a program that will take text input from the command line and use that information to send data to a (remote) networked process. You must provide the user with the ability to provide the remote hostname and port for the server. There must also be a way for the user to specify whether s/he expects Roman numeral to Arabic number or Arabic number to Roman numeral conversion as well as the value to be processed. The returned results will be displayed to the client's standard output. The client program must accept the -s servername flag and parameter to specify the hostname of the system running the server process, as well as accept the -p port-number flag and parameter indicating the port on which the server is listening. One (and only one) of the -r or-a flags will be provided by the user indicating Roman to Arabic or Arabic to Roman conversion, respectively. It is up to the client to check that a parameter to the-a flag is numeric and, conversely, a parameter to the -r flag is a string of only Roman numerals. For example, to connect to port 61494 on itsunix.albany.edu to translate the number 88 to Roman numerals the following command line would be issued and then provide the output shown: S ./p3client-s itsunix.albany.edu -p 61494-a 88 LXXXVII The Server: You will also write a program that runs as a server process and listens on a port specified by the user at execution time. It will read text input from its single network socket (indicated through the -p port-number flag and parameter), translate it and send back the results to the requester. The translation will be from Roman numeral to Arabic number or Arabic number to Roman numeral-the choice of which is indicated by the data sent by the client (numeric or character) For example, this would be the command indicating the server should start and listen on port 61494 where it will stay running to continue to serve clients until expressly terminated: itsunix.albany.edu$./p3server-p 61494 The Client You will write a program that will take text input from the command line and use that information to send data to a (remote) networked process. You must provide the user with the ability to provide the remote hostname and port for the server. There must also be a way for the user to specify whether s/he expects Roman numeral to Arabic number or Arabic number to Roman numeral conversion as well as the value to be processed. The returned results will be displayed to the client's standard output. The client program must accept the -s servername flag and parameter to specify the hostname of the system running the server process, as well as accept the -p port-number flag and parameter indicating the port on which the server is listening. One (and only one) of the -r or-a flags will be provided by the user indicating Roman to Arabic or Arabic to Roman conversion, respectively. It is up to the client to check that a parameter to the-a flag is numeric and, conversely, a parameter to the -r flag is a string of only Roman numerals. For example, to connect to port 61494 on itsunix.albany.edu to translate the number 88 to Roman numerals the following command line would be issued and then provide the output shown: S ./p3client-s itsunix.albany.edu -p 61494-a 88 LXXXVII The Server: You will also write a program that runs as a server process and listens on a port specified by the user at execution time. It will read text input from its single network socket (indicated through the -p port-number flag and parameter), translate it and send back the results to the requester. The translation will be from Roman numeral to Arabic number or Arabic number to Roman numeral-the choice of which is indicated by the data sent by the client (numeric or character) For example, this would be the command indicating the server should start and listen on port 61494 where it will stay running to continue to serve clients until expressly terminated: itsunix.albany.edu$./p3server-p 61494

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions

Question

Why We Listen?

Answered: 1 week ago