Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32476/core/protocolsuite/tcp_ip
Modified Files:
Tcp.java Udp.java
Log Message:
A little more on the dance floor
Index: Tcp.java
===================================================================
RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Tcp.java 25 Nov 2005 21:21:53 -0000 1.4
--- Tcp.java 25 Nov 2005 22:54:02 -0000 1.5
***************
*** 159,166 ****
private Hashtable PortTable = new Hashtable();
! private ProtocolStack mParentStack;
private static final int PORT_QUANT=100;
private static final int PORT_START_NUMBER=3000;
private static final int PORT_INIT = -1; //used in ListenPort && AlreadyListens
/**
--- 159,169 ----
private Hashtable PortTable = new Hashtable();
! private ProtocolStack mParentStack;
! private int window_size=10;
private static final int PORT_QUANT=100;
private static final int PORT_START_NUMBER=3000;
private static final int PORT_INIT = -1; //used in ListenPort && AlreadyListens
+ private static final int TOTAL_TIME = 10; //seconds to send all data
+ private static final int AXELER_KOEFF=2; //coeff depends on line quality, in practise >=2
/**
***************
*** 525,528 ****
}
! }
--- 528,556 ----
}
!
! /**
! * This method gets current window size.
! * @author gift (sourceforge.net user)
! * @param Unused.
! * @return int current TCP window size.
! * @version v0.10
! */
! public int getWindowSize()
! {
! return window_size;
! }
!
! /**
! * This method sets new window size.
! * @author gift (sourceforge.net user)
! * @param inSeg number of segments to send.
! * @return Nothing.
! * @version v0.10
! */
! public void setWindowSize(int inSeg)
! {
! window_size=(int)AXELER_KOEFF*inSeg/TOTAL_TIME;
! }
!
! } //EOF
Index: Udp.java
===================================================================
RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Udp.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** Udp.java 25 Nov 2005 21:21:53 -0000 1.26
--- Udp.java 25 Nov 2005 22:54:02 -0000 1.27
***************
*** 220,224 ****
UDP_Info.setObjectName(mParentStack.getParentNodeName());
! UDP_Info.setDataType("UDP Packet");
UDP_Info.setLayer("Transport");
--- 220,224 ----
UDP_Info.setObjectName(mParentStack.getParentNodeName());
! UDP_Info.setDataType("UDP Protocol");
UDP_Info.setLayer("Transport");
***************
*** 252,256 ****
UDP_Info.setObjectName(mParentStack.getParentNodeName());
! UDP_Info.setDataType("UDP Packet");
UDP_Info.setLayer("Transport");
--- 252,256 ----
UDP_Info.setObjectName(mParentStack.getParentNodeName());
! UDP_Info.setDataType("UDP Protocol");
UDP_Info.setLayer("Transport");
***************
*** 308,312 ****
LayerInfo UDP_Info = new LayerInfo(getClass().getName());
UDP_Info.setObjectName(mParentStack.getParentNodeName());
! UDP_Info.setDataType("UDP Packet");
UDP_Info.setLayer("Transport");
UDP_Info.setDescription("Created UDP packet for " + inDestIPAddress + ":" + insrcPort +".");
--- 308,312 ----
LayerInfo UDP_Info = new LayerInfo(getClass().getName());
UDP_Info.setObjectName(mParentStack.getParentNodeName());
! UDP_Info.setDataType("UDP Protocol");
UDP_Info.setLayer("Transport");
UDP_Info.setDescription("Created UDP packet for " + inDestIPAddress + ":" + insrcPort +".");
|