1 / 30
文档名称:

Go-Back-NJava程序,真正的好东西.docx

格式:docx   大小:105KB   页数:30页
下载后只包含 1 个 DOCX 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

Go-Back-NJava程序,真正的好东西.docx

上传人:pppccc8 2019/6/27 文件大小:105 KB

下载得到文件列表

Go-Back-NJava程序,真正的好东西.docx

相关文档

文档介绍

文档介绍:国外教材《计算机网络》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