Introduction - If you have any usage issues, please Google them yourself
1) p1 simulate the sender: first, to be sent from the interface to read characters (each character to accept an input), save to file file1.txt, and start the timer; (2) P2 analog receiver, it looks from file1.txt whether there are new characters come and provide analog interface for the user to choose: 1, Ack--> receiver the 2 character, NAK-- "discard 3 and no response to a timeout --" will be the result of user selection to record file2.txt; save the received characters to file3.txt; (3) p1 receiver response: reading file2.txt decided to wait for the following operations: 1, if ACK, will continue to receive user input, if it is 2; NAK, the retransmission of the character; 3, if the timeout is still no new ACK or NAK, the retransmission of the character.