Coder Social home page Coder Social logo

claudiopezzino / go-back-n Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wduan1025/go-back-n

0.0 0.0 0.0 35 KB

Implementation of Go-Back-N protocol using C

License: Apache License 2.0

Shell 0.06% C++ 0.56% Python 0.73% C 92.63% Objective-C 2.70% Makefile 3.32%

go-back-n's Introduction

Go-Back-N

An implementation of Go-Back-N protocol.This is a teamwork with kennch. An article about interesting issues during our implementing process can be found here.

Feature

  • Cycler array is used to store packet window, making it compatible for transfering unlimited larget file.
  • Dynamically swtiching window size among 1,2, and 4 based on TIMEOUT event. When all ACKs received, switch to larger window size, but when there is ACK loss, slow down to size 1 window

Usage

create input file with name , it can be of any type: pdf, jpeg, etc.
make
launch receiver
./receiver <port> <output-file>
launch sender
./sender 127.0.0.1 <port> <input file>

C Standard

We use C99 for this lab.

External source

The logger used in this lab is credited to rxi/log.c

Play with it

Change packet loss rate and corrupt rate in file gbn.h, they are configured by LOSS_PROB and CORR_PROB.

Enable Logger Output

The logger for this lab is disabled by default, in order to optimize its performance. To enable logging output, go to gbn.c, and find gbn_init().

log_set_quiet(1);
log_set_level(LOG_DEBUG);

Changing log_set_quiet(1) to log_set_quiet(0) enables logging output. You can also change the logging level by modifying log_set_level(LOG_DEBUG). For more usages, you can have a reference on rxi/log.c

go-back-n's People

Contributors

wduan1025 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.