Title This assignment requires you to develop two Python programs. One is a client, the other is the... Description This assignment requires you to develop two Python programs. One is a client, the other is the server.   Server The server should “register” x procedures that the client will be able to call. It will then bind to the address “localhost” and port 8000. This is the address and port that the server will listen to for requests. Note that if you have binding errors, you may use another port as your computer may have an application that is using 8000. Most of the time, however, this will work. Your server invocation must be in the following form: python server.py localhost 8000 These procedures to be supported are as follows: name – returns the name of the server which is passed on the commandline during server invocation help – returns a list of procedures that the server supports servertime – returns the current time at the server in 24 hour format. I.e. 13:00:01 add(x,y) – returns the sum of x and y sub(x,y) – returns x – y mult(x,y) – returns x * y div(x,y) – returns x/y Client The client is to connect to the server using the server’s address and the port that the server is listening on (see above). It then will exercise each of the supported procedures using the values 8 and 6 for the values x and y respectively. Your client invocation must be in the following form: python client.py host_address host_port 8 6 Where host_address and host_port are the address and port that the server is listening on. If you are using a single computer for server and client computers just use “localhost” for the address and the port used above. The 8 and the 6 are the values for x and y. Example Output Of Client: 8 * 6 is 48.0 8 / 6 is 1.3333333333333333 8 + 6 is 14.0 8 - 6 is 2.0 8 / 0 is Infinity 13:50:22

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Title
This assignment requires you to develop two Python programs. One is a client, the other is the...
Description

This assignment requires you to develop two Python programs. One is a client, the other is the server.</o:p>

 

Server</o:p>

The server should “register” x procedures that the client will be able to call. It will then bind to the address “localhost” and port 8000. This is the address and port that the server will listen to for requests. Note that if you have binding errors, you may use another port as your computer may have an application that is using 8000. Most of the time, however, this will work. Your server invocation must be in the following form:</o:p>

python server.py localhost 8000
These procedures to be supported are as follows:</o:p>

name – returns the name of the server which is passed on the commandline during server invocation</o:p>

help – returns a list of procedures that the server supports</o:p>

servertime – returns the current time at the server in 24 hour format. I.e. 13:00:01</o:p>

add(x,y) – returns the sum of x and y</o:p>

sub(x,y) – returns x – y</o:p>

mult(x,y) – returns x * y</o:p>

div(x,y) – returns x/y</o:p>

Client</o:p>

The client is to connect to the server using the server’s address and the port that the server is listening on (see above). It then will exercise each of the supported procedures using the values 8 and 6 for the values x and y respectively. Your client invocation must be in the following form:</o:p>

python client.py host_address host_port 8 6</o:p>

Where host_address and host_port are the address and port that the server is listening on. If you are using a single computer for server and client computers just use “localhost” for the address and the port used above. The 8 and the 6 are the values for x and y.</o:p>

Example Output Of Client:</o:p>

8 * 6 is 48.0</o:p>

8 / 6 is 1.3333333333333333</o:p>

8 + 6 is 14.0</o:p>

8 - 6 is 2.0</o:p>

8 / 0 is Infinity</o:p>

13:50:22</o:p>

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education