CS 145A Lab 2(due: Nov 1st)
Tasks for Lab 2: Design a simple protocol
- Two machines talk with each other
- Either machine is able to establish the conversation.
- During the conversation, if one machine sends some message to the other
machine, the other machine displays the message on the screen.
- If one machine does not want to talk any more (or dies, or is disconnected
from the network), the other machine should have a way to know about that.
(although maybe after some delay ¨C the delay should be bounded.)
Assumption on Underlying Layer:
- We can use TCP (reliable connection)
- The TCP may return error when you tries to do socket operations. (not so
- Read RFC 2119.
- Use state transition graph to help you design
- Use texts to specify the details (use the key words as defined in RFC 2119)
- Think about different scenarios to test your design
- Correctness and Completeness (80%)
- Feasibility (20%)
- "What kind of error may I get from TCP?" -- Read the man page
for the socket commands we used in lab1.
- "What kind of strange situation may I get?" -- Use check the input
set of the state transition graph in your design.