Write A Java Program For Congestion Control Using Leaky Bucket Algorithm
Write A Java Program For Congestion Control Using Leaky Bucket Algorithm
import java.util.Scanner;
// Prompt the user to enter bucket size, outgoing rate, and the number of packets
System.out.println("Enter bucket size, outgoing rate and Number of Packets:");
buck_size = sc.nextInt(); // Read bucket size
outgoing = sc.nextInt(); // Read outgoing rate
n = sc.nextInt(); // Read the number of packets to be simulated