Building a calculator server with the socket module

The functionality that we are trying to implement is to have a simple request handler that calculates either the sum or the product of a list of integers, and that is included in the data sent from the clients. Specifically, if a client sends the string 12 ,4 to our server, then the server should send back 7 if it is to calculate sums, or 8 if it is to calculate products.

Every server implements some form of data processing, in addition to handling requests coming in from clients and sending the results of that data processing task to those clients. This prototype will therefore serve as a first building block for more extensive servers, with further complex functionalities.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.118.229