For H12A and H14A students.
- MUST use UDP for P2P part (otherwise you will lose marks).
- Use 'try...except...' to catch every exception so your client and server will not crash.
- Follow the SPEC to design your application, your application should have SAME output as the SPEC example.
- Do not concern too much about the corner case, make sure the function is working properly at first!
Note: Please try to run your application with the follwing commands, and check if you have expected output. This is not an official testcase, just for reference, please always follow the instructions of Assignment SPEC.
- login with correct password
- login with incorrect password, for 3 times. -- the client terminal should shutdown and user should be blocked.
- login with with a blocked username, from another client(new terminal).
- login with a username that does not exist
- Check the page 13~14 in SPEC, make sure you have the same output as the examples.
- try this new credentials.txt
- login Hans, Yoda. Then use Yoda issue the ATU command -- the server should exclude the information of the client, who sends ATU command to the server.
- login Yoda only, then issue the ATU cmd, it should prompt "no other active user". Also check the logfile userlog.txt, make sure the log file is following the format at page 3 SPEC.
- Use Yoda to issue
BCM
command, The client should display an error message. - Use Yoda to issue
BCM Hello world! COMP3331
command, then check the logfile messagelog.txt, make sure the format is following the page 4 SPEC:
messageNumber; timestamp; username; message
1; 1 Jun 2022 21:39:04; yoda; Hello world! COMP3331
- Then login Hans, issue the command
RDM b 1 Jun 2022 21:39:00
-- you should be able to see the message from Yoda.
- Login Yoda only, then issue command
SRB
andSRB Yoda
andSRB Hans
andSRB offlineuser
, the client should display an error message. - Login Yoda and Hans, then issue command
SRB Hans
in yoda's terminal and issue the commandSRB Yoda
in Hans' terminal , you should have only 1 room (if a separate room already created for this group of users no matter which user in the group created, the server should not create another separate room, thanks to @Finbar to point this problem out ) - Following the last one
- issue
SRM
in Yoda's terminal, the client should display an error message. - issue the command
SRM 1 Hi, Hans
andSRM 2 Hi, Hans
in Yoda's terminal -- should be succesful.
- issue
- Following the last one,
- issue
RDM
in Yoda's terminal, the client should display an error message. - issue the command
RDM s 1 Jun 2033 21:39:00
in Hans' terminal -- should have no message been shown since the timestamp is year 2033. - issue the command
RDM s 1 Jun 2022 21:39:00
in Hans' terminal -- should be succesful display the Yoda's messages in room 1 and 2.
- issue
- Login to Yoda, check the active user log, yoda should be in the logfile.
- Issue command
BCM Hello world!
, then issueOUT
, check the active user log, yoda should not be in the logfile now. Then check messagelog.txt, yoda's message should still inside the file.
- Check the code in client.py, make sure it is UDP instead of TCP;
- Download the video file ski.mp4, put it in the same folder with client.py.
- Login to Yoda only, then issue
UPD
andUPD Hans Filenotexist.mp4
andUPD Hans ski.mp4
, your client should prompt an error message. - Login to Yoda and Hans, then try to run
UPD Hans ski.mp4
in Yoda's terminal, you should be able to find the yoda_ski.mp4 in the folder, try to play the video, see if it is playable.
Please check the Assignment SPEC. Page 13~18, test your program with the examples and make sure you have exactly same output.