D
David
i have two class, in the second one, i use sUpper to locate the insert
point,
class ReliableDatagramSocket extends DodgyDatagramSocket {
private final int WINDOWSIZE=8;
private int sLower=0, sUpper=0, sActive=0;
private void putIntoList(int sUpper, byte[] buf){
sendBuf.add(sUpper,buf);
sUpper=(sUpper+1)%WINDOWSIZE;
}
}
the first one transfers buf to the second one, now the problem is, every
time when i exit from the method, the sUpper return to 0 again, so, i cannot
change the sUpper's value. what's wrong with that???
point,
class ReliableDatagramSocket extends DodgyDatagramSocket {
private final int WINDOWSIZE=8;
private int sLower=0, sUpper=0, sActive=0;
private void putIntoList(int sUpper, byte[] buf){
sendBuf.add(sUpper,buf);
sUpper=(sUpper+1)%WINDOWSIZE;
}
}
the first one transfers buf to the second one, now the problem is, every
time when i exit from the method, the sUpper return to 0 again, so, i cannot
change the sUpper's value. what's wrong with that???