forked from KNEMC/KLALB
KLALB UDP TEST
This commit is contained in:
@@ -8,7 +8,7 @@ import java.io.ObjectInput;
|
||||
import java.io.ObjectOutput;
|
||||
import java.util.Vector;
|
||||
|
||||
public abstract class KLALBPacket{
|
||||
public abstract class KLALBPacket implements Sumable{
|
||||
public static final int PING=0;
|
||||
public static final int PONG=1;
|
||||
public static final int SYNT=2;
|
||||
@@ -18,7 +18,11 @@ public abstract class KLALBPacket{
|
||||
public static final int ACKT=6;
|
||||
public static final int DATAU=7;
|
||||
public static final int VADDR=8;
|
||||
public static final int LINES=9;
|
||||
public static final int ADDLINES=9;
|
||||
public static final int NACKT=10;
|
||||
public static final int TEST=11;
|
||||
public static final int VADDRACK=12;
|
||||
public static final int VADDRREQ=13;
|
||||
private int type;
|
||||
|
||||
public KLALBPacket(int type) {
|
||||
@@ -32,18 +36,32 @@ public abstract class KLALBPacket{
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
private long sndtime,rcvtime;
|
||||
protected void writeToStream(DataOutput dto) throws IOException {
|
||||
|
||||
sndtime=System.nanoTime();
|
||||
}
|
||||
protected void readFromStream(DataInput din) throws IOException {
|
||||
|
||||
rcvtime=System.nanoTime();
|
||||
}
|
||||
public long getSndtime() {
|
||||
return sndtime;
|
||||
}
|
||||
public long getRcvtime() {
|
||||
return rcvtime;
|
||||
}
|
||||
public long getLength() {
|
||||
return 1;
|
||||
}
|
||||
private Vector<KLALBRemoteSocket> sendRecord=new Vector<>();
|
||||
@Override
|
||||
public long getValue() {
|
||||
return getLength();
|
||||
}
|
||||
|
||||
public Vector<KLALBRemoteSocket> getSendRecord() {
|
||||
|
||||
private Vector<KLALBRemoteLine> sendRecord=new Vector<>();
|
||||
|
||||
public Vector<KLALBRemoteLine> getSendRecord() {
|
||||
return sendRecord;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user