This assignment is to write a modification of Homework 2, the UDP client. This time the UDP client/server will use piggy backed sequence numbers and acknowledgements to achieve a reliable message transfer. This is done by pre-pending each datagram with a line similar to
ACK n SEQ m
which says that this is the n'th datagram transmitted by the sender and that it acknoledges the m'th datagram previously transmitted by the datagram's intended recepient.
Here's an example session
client | server |
---|---|
ACK 0 SEQ 1 PLAY | ACK 1 SEQ 1 BALANCE 1000000 VERIFIER SQUARED 178991952 |
ACK 1 SEQ 2 BET 100000 ON 7 | ACK 2 SEQ 2 NUMBER 7 YOU WIN BALANCE 1700000 VERIFIER 932968576 |
ACK 2 SEQ 3 PLAY | ....... |
ACK 106 SEQ 107 EXIT | ACK 107 SEQ 107 BYEBYE |
Except for the server's last transmission, both client and server must continually retransmit their datagram once per second until an acknolwedgment is received or one minute has passed.
In a week or so, the server for this application will be running on port 8888 of penrose.cs.unca.edu. Just like in homework 2, this port is used only for the first message exchange.
Back to the Handout index
Return to Dean Brock's
home page
Return to
the UNCA Computer Science home
page