Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv9381/core/protocolsuite/tcp_ip
Modified Files:
Tcp.java
Log Message:
.....
Index: Tcp.java
===================================================================
RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp.java,v
retrieving revision 1.82
retrieving revision 1.83
diff -C2 -d -r1.82 -r1.83
*** Tcp.java 8 Sep 2006 15:39:44 -0000 1.82
--- Tcp.java 8 Sep 2006 16:29:13 -0000 1.83
***************
*** 110,124 ****
*
* Created on 25 November 2005, 17:33
! */
!
!
!
! private static int iiiiii=0;
!
!
!
private Hashtable PortTable = new Hashtable();
private ProtocolStack mParentStack;
! private int window_size=2000; //25
// private int total_received=0;
--- 110,117 ----
*
* Created on 25 November 2005, 17:33
! */
private Hashtable PortTable = new Hashtable();
private ProtocolStack mParentStack;
! private int window_size=25; //2000; //25
// private int total_received=0;
***************
*** 731,736 ****
/**
! * This method returns the ORD ACK number in
* Elm.ReceivedACKs
* @author gift (sourceforge.net user)
* @param inV vector of Integers
--- 724,730 ----
/**
! * This method returns the maximum ordered ACK number in
* Elm.ReceivedACKs
+ * !!CHECK IF isEmpty
* @author gift (sourceforge.net user)
* @param inV vector of Integers
***************
*** 738,741 ****
--- 732,736 ----
*/
private int GetNumber(Vector inV) {
+ /*
int mx=0;
boolean ordered=true;
***************
*** 750,753 ****
--- 745,758 ----
return previous;
+ */
+
+ int mx = 1;
+
+ while (inV.contains((Integer)mx))
+ {
+ mx++;
+ }
+
+ return mx--;
}
***************
*** 994,999 ****
//everything is OK
! //MAYBE A DUPLICATE?
!
if ((Elm.ReceivedSegments.contains((Integer)inPacket.get_sequence_number()))) {
try {
--- 999,1003 ----
//everything is OK
! //MAYBE A DUPLICATE?
if ((Elm.ReceivedSegments.contains((Integer)inPacket.get_sequence_number()))) {
try {
|