Laboratory Manuals: Computer Networks
Laboratory Manuals: Computer Networks
Laboratory Manuals
for
Computer Networks
(CL -307)
Objective:
UDP Socket Programming
UDP uses a simple connectionless transmission model with a minimum of protocol mechanism.
With UDP, computer applications can send messages, referred to as datagrams, to other hosts on
an Internet Protocol (IP) network without prior communications to set up special transmission
channels or data paths. Following are its characteristics:
Or
The system must get the packet sent by the client and must process the packet accordingly. Your
system must cater the following cases.
Check in:
Marks the in attendance of the client in a database of the students and returns a welcome
message “Welcome Student YY-AAAA”
If the user is already checked in it must send the message “You are already here.”
Check out:
Marks the out attendance for the client from the student database and then fill the empty
place in the database (e.g., if a student initially placed at place 5 has left then all the
students above position 5 must come one position down to fill that position). The server
must send the message “Good Bye Student YY-AAAA! Have a nice day.”
If the user didn’t check in and sent the checkout packet, the server must return the
message “You didn’t check in today. Contact System Administrator.”
Note:
You must print all the members present in the database each time client makes a
request to check in or check out.