Click here to Skip to main content
13,202,155 members (54,265 online)
Click here to Skip to main content
Add your own
alternative version


15 bookmarked
Posted 21 Jun 2006

Go-Back-N Simulator

, 6 May 2007
Rate this:
Please Sign up or sign in to vote.
GO - BACK - N Simulator

Sample Image - gbn.jpg


This is a GO-BACK-N simulation writen in C# 2.0. Go-Back-N ARQ is a specific instance of the Automatic Repeat-reQuest (ARQ) Protocol, in which the sending process continues to send a number of frames specified by a window size without receiving an ACK packet from the receiver. The receiver process keeps track of the sequence number of the next frame it expects to receive, and sends that number with every ACK it sends. If a frame from the sender does not reach the receiver, the receiver will stop acknowledging received frames. Once the sender has sent all of the frames in its window, it will detect that all of the frames since the first lost frame are outstanding, and will go back to sequence number of the last ACK it received from the receiver process and fill its window starting with that frame and continue the process over again.

Work Structure

The simulation includes two different programs. One of them does server operations and the other one does client operations. Firstly client accepts a 10240(40*256) Bytes long file. It splits these bytes into 40 segments. Then user selects the probability of corruption while client is sending segments to the server, the probability of corruption while server is sending acknowledges to the client side and window size which determines the number of segments that are sent in the same time.

The client sends segments to the server with the probability of corruption that user has chosen. If packets are dropped, acknowledges are not sent back to client. If packets are received, server can not send acknowledges to client side. Because of the probability of corruption in acks, acks can be dropped.

After all segments are sent, user can defrag all segments and get the file.

Multi threads are used to send segments.


This simulation performs an unreliable channel using TCP!!! Packets and acknowledges are consciously dropped to show working structure of Go-Back-N.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Mustafa Sait Ozen
Software Developer (Senior)
Turkey Turkey
He has graduated from Anadolu University Electrical and Electronics Engineering Deparment in 2005 and got his Master Degree from same department in July 2008. Now he is working as a Software Specialist in TUBITAK Marmara Research Center Technology Free Zone.

You may also be interested in...

Comments and Discussions

GeneralNot a quality article. Pin
Rob Graham6-May-07 15:52
memberRob Graham6-May-07 15:52 
GeneralRe: Not a quality article. Pin
Mustafa Sait Ozen6-May-07 21:23
memberMustafa Sait Ozen6-May-07 21:23 
GeneralRe: Not a quality article. Pin
plutoa1009-May-07 15:01
memberplutoa1009-May-07 15:01 
QuestionStop and wait Pin
kuzman22-Mar-07 14:07
memberkuzman22-Mar-07 14:07 
AnswerRe: Stop and wait Pin
Mustafa Sait Ozen22-Mar-07 23:40
memberMustafa Sait Ozen22-Mar-07 23:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.171020.1 | Last Updated 6 May 2007
Article Copyright 2006 by Mustafa Sait Ozen
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid