Skip to content

f3n-9/2025-COMP211-Assignment2-Reliable-Data-Transfer

Repository files navigation

Project Description

Overview

This is a Java-based network simulator for Assignment 2 (COMP211). The project simulates packet transmission using an event-driven approach and includes implementations for sender and receiver protocols.

File Structure

  • Assign2code.iml — provided by instructor
  • Assignment2.java — provided by instructor (main entry)
  • Event.java — provided by instructor
  • EventList.java — provided by instructor
  • Message.java — provided by instructor
  • NetworkHost.java — provided by instructor
  • NetworkSimulator.java — provided by instructor
  • Packet.java — provided by instructor
  • Receiver.java — implemented as part of this assignment (student work)
  • Sender.java — implemented as part of this assignment (student work)
  • Testing.java — test code (part of the project)

Requirements

  • Java JDK 8 or higher
  • Recommended IDE: IntelliJ IDEA (Windows)

Usage

  1. Open the project in IntelliJ IDEA.
  2. Compile and run Assignment2.java.

Branches

  • gobackn — Implements the Go-Back-N protocol. The sender can transmit multiple packets within a window and uses cumulative acknowledgments. On timeout of a packet, the sender retransmits all unacknowledged packets starting from the base sequence number. Suitable for higher throughput.

  • stopandwait — Implements the Stop-and-Wait protocol. The sender transmits one packet at a time and waits for its acknowledgment (or timeout) before sending the next. Simpler but lower throughput.

Switch branches with:

  • git checkout gobackn
  • git checkout stopandwait

Notes

  • Receiver.java and Sender.java are the parts implemented by the student; other source files were provided by the instructor.
  • This assignment received a score of 98/100.

About

98/100 Computer Network, Reliable Data Transfer Simulator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages