HW2-Simple Iterative TCP Client Server For Password Strength Verification
HW2-Simple Iterative TCP Client Server For Password Strength Verification
Client-side:
The client asks the user to input a string representing his/her password. The password is sent to
the server for verification and wait for a reply.
Once the reply from the server arrives, the client displays the result to the user (with
appropriate formatting) and asks the user for another round of input. Note that the connection
between the client and server should stay open, so that the client can repeat the operation again
until the user ask for termination by entering the word “done”. At this point, also the server
terminates.
The client should use command line arguments to read the IP and port number of the server,
and leave it for the kernel to assign its local socket address.
Server_side:
The server will wait for clients’ requests in the specified format as explained above,
perform the verification, sends the result back to the client, then waits for next request until it
terminates when the client enters “done”. The server verifies the password against the following
requirements:
If the server receives an incorrect password, it should report back the password that
caused the error to the client with the error message indicating which requirement(s) failed. The
client need to display that for the user.
At the server side, the server is required to display the IP and the port number of the
client together with the password itself. Note that the server should use command line arguments
to indicate the port it will listen to. To avoid conflict when working on the course server, each
student is required to use a port number for the server using the following format: 44abc for its
connection, where abc is the least significant 3 digits of your students ID. For example, a student
whose ID is 12345 will have the server listening port = 44345.
Submission:
You files should follow the following naming convention: yourID_HW#
Only one member of the group required to submit the HW.
Submit a zipped file containing only the course code ( following the naming convention)
and a screen shot of compiling and running your code ( both client and server)
Hints/Notes:
DO NOT use the header file “unp.h” from the book
Each student running the code should use a port number for the server following the rule
described above
Your program for client needs to take two arguments that specify the IP address of the
server and the port that it is trying to connect to. Your program for server needs to take an
argument that specifies the port that it is listening to ( the same one provided to the client)
Ask questions as early as possible.
Your programs should be compiled and run without any single error or warning.
Comment and error-check you code