[Javanetsim-cvs] javaNetSim/guiUI MainScreen.java,1.24,1.25
Status: Beta
Brought to you by:
darkkey
From: Alexander B. <da...@us...> - 2005-12-08 20:11:13
|
Update of /cvsroot/javanetsim/javaNetSim/guiUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16673/guiUI Modified Files: MainScreen.java Log Message: New Echo (v2) implementation. Index: MainScreen.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/MainScreen.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** MainScreen.java 8 Dec 2005 19:04:24 -0000 1.24 --- MainScreen.java 8 Dec 2005 20:10:58 -0000 1.25 *************** *** 3021,3026 **** String msg = JOptionPane.showInputDialog(this, "Message:", "Message.", JOptionPane.QUESTION_MESSAGE); ! if(port!=null && ip!=null && msg!=null){ try{ --- 3021,3028 ---- String msg = JOptionPane.showInputDialog(this, "Message:", "Message.", JOptionPane.QUESTION_MESSAGE); + + String cnt = JOptionPane.showInputDialog(this, "Number:", "How many times send.", JOptionPane.QUESTION_MESSAGE); ! if(port!=null && ip!=null && msg!=null && cnt!=null){ try{ *************** *** 3028,3032 **** printNetworkStart(); ! ((Echo)((core.ApplicationLayerDevice)Sim.getNode(inNodeName)).getApp(30007)).SendEcho(msg, ip, Integer.valueOf(port).intValue()); this.addToConsole("Trying to send echo message '" + msg + "' from " + inNodeName + " to " + ip + ":" + port + "\n"); --- 3030,3034 ---- printNetworkStart(); ! ((Echo)((core.ApplicationLayerDevice)Sim.getNode(inNodeName)).getApp(30007)).SendEcho(msg, ip, Integer.valueOf(port).intValue(), Integer.valueOf(cnt).intValue()); this.addToConsole("Trying to send echo message '" + msg + "' from " + inNodeName + " to " + ip + ":" + port + "\n"); *************** *** 3085,3089 **** String msg = JOptionPane.showInputDialog(this, "Message:", "Message.", JOptionPane.QUESTION_MESSAGE); ! if(port!=null && ip!=null && msg!=null){ try{ --- 3087,3093 ---- String msg = JOptionPane.showInputDialog(this, "Message:", "Message.", JOptionPane.QUESTION_MESSAGE); ! String cnt = JOptionPane.showInputDialog(this, "Number:", "How many times send.", JOptionPane.QUESTION_MESSAGE); ! ! if(port!=null && ip!=null && msg!=null && cnt!=null){ try{ *************** *** 3095,3099 **** timer.schedule(new TTask(this),4000,4000); ! ((Echo_tcp)((core.ApplicationLayerDevice)Sim.getNode(inNodeName)).getApp(30017)).SendEcho(msg, ip, Integer.valueOf(port).intValue()); this.addToConsole("Trying to send echo message '" + msg + "' from " + inNodeName + " to " + ip + ":" + port + "\n"); --- 3099,3103 ---- timer.schedule(new TTask(this),4000,4000); ! ((Echo_tcp)((core.ApplicationLayerDevice)Sim.getNode(inNodeName)).getApp(30017)).SendEcho(msg, ip, Integer.valueOf(port).intValue(), Integer.valueOf(cnt).intValue()); this.addToConsole("Trying to send echo message '" + msg + "' from " + inNodeName + " to " + ip + ":" + port + "\n"); |