I am developing a small stop and go protocol simulation.
Following has to be implemented:
Sender is having queue of frame.
Sender is having window on the frame queue, window size tells that their is start frame, last frame and current frame.
Sender will send from start frame to last frame irrespective of the acknowledgement from the reciever, with break in between
Sender takes the fram from its own queu and thens sends to a common class Handler (which both sender and reciever can access and uses to put frame and getframe), which is then taken from reciever.
Reciever each time checks the handler queue for any frame put by sender, if it is there then reciever will get teh frame and will send the acknowledgement. It is not necessary for reciever to send acknowledgement each time. It can send acknowledgement may be after each frame or after 2-3 frames.
How to implement this scenario.
Sandeep
I am attaching the startup code, well this works fine if each ack. has to be send after each frame (Producer consumer problem) . But in this case there is no such producer and consumer problem as producer will keep on producing and consumer will consume wehn it is respective
Note: if sender does not get ack. for the start frame in window when it has reached to last then it will again resend all the frames in teh window
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.