KLALB V3.6.0 写了一半
This commit is contained in:
@@ -9,16 +9,24 @@ import java.nio.ByteBuffer;
|
||||
|
||||
public class PINGPacket extends KLALBPacket {
|
||||
|
||||
private static final int HEADER_LENGTH=9;
|
||||
private static final int HEADER_LENGTH=25;
|
||||
|
||||
public long getTime() {
|
||||
return klalbHeader.getLong(17);
|
||||
}
|
||||
|
||||
public long getUpSpeed() {
|
||||
return klalbHeader.getLong(1);
|
||||
}
|
||||
|
||||
public long getDownSpeed() {
|
||||
return klalbHeader.getLong(9);
|
||||
}
|
||||
|
||||
|
||||
public PINGPacket(long time) {
|
||||
super(PING,HEADER_LENGTH,-1);
|
||||
public PINGPacket(long time,long upSpeed,long downSpeed) {
|
||||
super(PING,HEADER_LENGTH);
|
||||
klalbHeader.putLong(upSpeed);
|
||||
klalbHeader.putLong(downSpeed);
|
||||
klalbHeader.putLong(time);
|
||||
}
|
||||
public PINGPacket(ByteBuffer bb) {
|
||||
|
||||
Reference in New Issue
Block a user