CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1
  1. #1
    Join Date
    May 2003
    Location
    Jodhpur -> Rajasthan -> INDIA
    Posts
    453

    developing a small Stop N Go algorithm simulation

    Hello dear

    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


    HOW TO IMPLEMENT THIS???
    Attached Files Attached Files
    Leave Your Mark Wherever You Go
    http://www.danasoft.com/sig/d0153030Sig.jpg

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured