文档介绍:国外教材《计算机网络》Go-Back-NJava程序,形象生动,学****效果很好。/*working:ATopDownApproach!rbyJamesKurose&,section4.*,-459/591・Spring2001*AppletsignificantlyrevisedbyMatthewShatleyandChrisHoffmanforProfessorPaulD・Amer(******@)UniversityofDelaware(2008)*,asoutlinedonpg234inthe5theditionoftheaforementionedtext.*umbers:,.*/;.*;;;lassGBNextendsAppletimplementsActionListener,Runnable{privatestaticfinalintADVANCEPACKET二5;//Defaultvaluesofparametersforanimation//_dcfthesendercanhaveamaximumof5outstanding//un-acknowledgedpacketsfinalintsender_window_len_def=5;//howmanypacketsthereceivercanholdinmemorywithoutdeliveringdata//inthecaseofGBNwecanhold1(orthecurrentpacket)inmemory//ifanotherpacketarrivestheoneinmemoryisdiscardedfinalintreceiverwindowlen二1;//ponentstodescribehowtheSimulationshouldbedrawnfinalintfinalintfinalmtfinalmtfinalintpack_width_dcf二10;pack_height_def=30;h_offset_def=100;voffsetdef二50;v_clearance_def=300;//usedfortimeoutvalues,thread,sleep()isspecifiedinmilliseconds//soweconverttosecondsfortimeoutprocessing.(1000milliseconds=1second)finalintTIMEOUT_MULTIPLIER二1000;finalintM1N_FPS=3;finalintFPS_STEP=2;finalintDESELECTED二-1;finalintDEFAULT_FPS=5;//defauItto20packetsifnovalueissuppliedfinalinttotal_packet_def=20;//25secdefauIttimeoutforretransmissionsfinalinttimeoutsecdef二25;//DefauItcolorsofdifferentpackets//thesehavebeenmatchedascloselytothethetextaspossible//OrderofcolorvaluesRed,Green,BluefinalC