Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.
/ reti-esonero-tcp Public archive

Repository for "Reti di Calcolatori" (an exam for the Computer Science course of the University of Bari)

License

Notifications You must be signed in to change notification settings

Hacryn/reti-esonero-tcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Online Integer Calculator (TCP)

The app has two executables: a client and a server.

The server executes the math operations while the client interacts with the user.

The server has one parameter: the port number, if it is not given the server assume the default port number.
Given a wrong port number to the server alerts the user and close the application with an error code.
Server.exe 55000 (assign 55000 as the port number for the server)

The client has two parameters: the ip address and the port number of the server.
If both parameters are missing the client uses the default parameters; if only the port number is missing the client uses the default port number.
If the ip address is not a valid ip address the client uses the default ip address, if the port number is not a valid port number the client uses the default port number.
Client.exe 127.0.0.1 55000 (connect with the server on the 55000 port at 127.0.0.1) or
Client.exe 127.0.0.1 (connect with the server on the default port at 127.0.0.1).

The calculator accepts only integer number and return an integer (or an error),
the command for the operations is: [operation char] [integer] [integer].
The possible operation are: ‘+’ (addition), ‘–‘ (subtraction), ‘x’ (multiplication) and ‘/’ (division).
eg. + 1 1 = 1 + 1.

If the client cannot send/receive from the server for 3 or more times the client shutdown the connection.

About

Repository for "Reti di Calcolatori" (an exam for the Computer Science course of the University of Bari)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages