首页 > > 详细

CS265语言编程辅导、辅导Python程序

CS265 Computer Networking: Programming Problem 1
Due: Thursday, February 24, 2022 at 11:59PM.
Description
In this assignment you are to develop a chat program that uses the UVMPM protocol, which is described at
http://ceskalka.w3.uvm.edu/265/uvmpm-rfc.txt. A UVMPM server socket is available
for connections from within the UVM domain1
at 132.198.11.122
.
You can use whatever programming language and socket library you wish. However, your assignment
must be gradeable, in the sense that we need to be able to test it. This means you should write your client
either (1) with a command line interface runnable on silk3
, or (2) designed with a GUI interface runnable
on a recent “vanilla” installation of OSX or Windows. In case (2) you should definitely test your code on
a UVM computer lab machine to ensure it works properly for testing- and obviously this option requires
more work and should only be pursued if you are interested, there are no additional points for a GUI
version. In any case your application should prompt the user for signin, and subsequently allow users to
list other users, message other users, and to sign off.
The interface you develop should be appealing to use and not “expose” any details of the UVMPM
protocol, which should be managed by your code. An example of a command line interface interaction,
and the corresponding UVMPM traffic, is provided below for guidance.
User Accounts
You have been preassigned a user account on the UVMPM server at 132.198.11.12– your username is
your UVM netid, and your password is your netid backwards. In addition, the server supports user accounts
test1 through test10, all with password p001.
What to Submit
Please submit all source code, as well as a README file if necessary with any relevant instructions about
compiling and/or using your client.
Grading Criteria
Your submissions will be graded on the following criteria:
• Syntactic correctness (does your code parse correctly): 20%
• Functional correctness (does your code do the right thing?): 75%, with partial credit given for partial
solution.
• Style (program structure, formatting, commenting): 5%
1You will need to be on silk or running UVM VPN.
2Our UVMPM server source code is available in the public CS265 git repo- see Supplemental Materials on bb for the repo URL.
3Note that Python 3 is installed on silk.
1
Examples
Here is an example of a command-line user interface you could emulate.
$ ./client.py
Please enter the server hostname or IPv4 address: 132.198.11.12
Please enter the server port number: 12000
Please enter a username: test1
Please enter a password: p099
Incorrect username and/or password.
Please enter a username: test1
Please enter a password: p001
You are now authenticated.
Choose an option:
1. List online users
2. Send someone a message
3. Sign off
1
Users currently logged in:
test2, test1
Choose an option:
1. List online users
2. Send someone a message
3. Sign off
2
User you would like to message: test2
Message: Hello, what’s up?
Message sent.
Choose an option:
1. List online users
2. Send someone a message
3. Sign off
Message from test2: Gotta go, I’m busy programming, I love CS265 so much :)!
test2 signed off.
1
Users currently logged in:
test1
Choose an option:
1. List online users
2. Send someone a message
3. Sign off
3
$
The above interface interaction is supported by the following UVMPM message exchanges between the
client process C and server process S over their socket connection.
C: HELLO
S: HELLO
C: AUTH:test1:p099
S: AUTHNO
C: AUTH:test1:p001
S: AUTHYES
S: SIGNIN: test1
C: LIST
2
S: test2, test1
C: To:test2:Hello, what’s up?
S: From:test2:Gotta go, I’m busy programming, I love CS265 so much :)!
S: SIGNOFF:test2
C: LIST
S: test1
C: BYE
S: SIGNOFF:test1

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!