//----------------------------------------------------------------- // CSE 461 Project 1: Provided client code // // This file implements the main driver loop for the program. // It creates a sender and a receiver, connects them, and then // sends a stream of data and measures the performance. You // shouldn't need to change anything but parameters in this file. // // See sender.java and receiver.java for the implementations // of the sender and receiver algorithms // // USAGE: java project1 [seed] //----------------------------------------------------------------- import java.io.*; import java.util.*; public class project1 implements Runnable { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // main entry point. Create an actual instance and call that. // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - public static void main (String[] args) { project1 runProject = new project1 (); ParseArgs (args); runProject.Go (args); } public static long SEED = System.currentTimeMillis (); public static int LINK_MTU = 20; public static double LINK_BW = 1.0; public static double LINK_BW_SD = 0.2; public static double LINK_BW_WALK = 0.5; public static double LINK_LATENCY = 2.0; public static double LINK_LATENCY_SD = 0.5; public static double LINK_LATENCY_WALK = 0.5; public static double LINK_DROP_PROB = 0.25; private static void ParseArgs (String[] args) { for (int i=0; i 50) { monitor.PrintStats (); System.exit (0); } } } }