This simulates a stop and wait ARQ protocol with modifiable simulation constraints.
- Install nodeJS
- Run
npm installin the directory. This will install all the required modules.
- For Reciever : Run
node reciever.js [port]eg -node reciever.js 3000 - For Sender : Run
node sender.js [ip] [port] [message]eg -node sender.js 127.0.0.1 3000 Hello_World
- All logs are prepended by [LAYER_NAME] which shows which layer is logging the information.
- Frame drops is simulated by just not sending the frame at all. The probability for this can be changed by modifying the
LOSS_PROBABLITYinconst.js. - Frame damage is simulated by just making the type DAMAGED. The probability for this can be changed by modifying the
CORRUPTION_PROBABILITYinconst.js.
- Computer Networks by Andrew S. Tanenbaum, David J. Wetherall