增加延迟检测功能

This commit is contained in:
Administrator
2022-11-27 10:19:45 +08:00
parent 4f2b416ac3
commit 913313b2a8
4 changed files with 64 additions and 14 deletions
@@ -9,7 +9,7 @@ public class KLALBBlock {
volatile long number;
//volatile long time=-1;
volatile long time=-1;
volatile Thread thread;
public KLALBBlock(byte[] b, int size,long number) {
data=b;
@@ -23,6 +23,10 @@ public class KLALBBlock {
public String toString() {
if(number>0) {
return "DATA"+number+":"+size;
}else if(number==0){
return "PING";
}else if(number==Long.MIN_VALUE){
return "PONG";
}else {
return "ACK"+(-number);
}