Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26083/core/protocolsuite/tcp_ip
Modified Files:
Echo.java Echo_tcp.java
Log Message:
Index: Echo_tcp.java
===================================================================
RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Echo_tcp.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** Echo_tcp.java 24 Feb 2006 15:41:44 -0000 1.22
--- Echo_tcp.java 28 Feb 2006 18:14:22 -0000 1.23
***************
*** 31,34 ****
--- 31,36 ----
private byte ConnectionAttempts=1;
private int counts;
+ private long
+ utc1;
/** Creates a new instance of Echo */
***************
*** 187,191 ****
--- 189,200 ----
if(this.counts==0){
+
Disconnect();
+ LayerInfo protInfo2 = new LayerInfo(getClass().getName());
+ protInfo2.setObjectName(mParentStack.getParentNodeName());
+ protInfo2.setDataType("Echo Protocol Data");
+ protInfo2.setLayer("Application ");
+ protInfo2.setDescription("Connection time: " + (long)(System.currentTimeMillis () - utc1) + " ms.");
+ Simulation.addLayerInfo(protInfo2);
}else{
this.counts--;
***************
*** 237,240 ****
--- 246,251 ----
this.counts = counts;
+ utc1 = System.currentTimeMillis ();
+
if (ClientConnect(Host, port))
{
Index: Echo.java
===================================================================
RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Echo.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** Echo.java 24 Feb 2006 10:20:11 -0000 1.19
--- Echo.java 28 Feb 2006 18:14:22 -0000 1.20
***************
*** 28,31 ****
--- 28,33 ----
public class Echo extends Application{
+ long utc1;
+
/** Creates a new instance of Echo */
public Echo(ProtocolStack inParentStack, int listenPort, int appType, int UID) {
***************
*** 147,150 ****
--- 149,153 ----
Simulation.addLayerInfo(protInfo);*/
Disconnect();
+
}else{
//server processing recieve
***************
*** 192,195 ****
--- 195,200 ----
mParentStack.FreeUDPApplication(this);
+ utc1 = System.currentTimeMillis () ;
+
for(int c=0; c<counts; c++){
if (ClientConnect(Host, port))
***************
*** 214,217 ****
--- 219,228 ----
}
}
+ LayerInfo protInfo2 = new LayerInfo(getClass().getName());
+ protInfo2.setObjectName(mParentStack.getParentNodeName());
+ protInfo2.setDataType("Echo Protocol Data");
+ protInfo2.setLayer("Application ");
+ protInfo2.setDescription("Connection time: " + (long)(System.currentTimeMillis () - utc1) + " ms.");
+ Simulation.addLayerInfo(protInfo2);
}
|