mirror of
https://gitee.com/willfree/min-dev-java.git
synced 2026-10-04 19:42:01 +08:00
update all wireEncode & add packet test: CPacket
This commit is contained in:
1 parent
424d182d60
commit
2bf431af9c
33 files changed
+335
-317
No files matched your search
@@ -48,21 +48,21 @@ public class MustBeRefresh implements TlvComponentBase, InitialAble, IEncodingAb
|
||||
try {
|
||||
// 这是一个存在性组件,所以如果值为false,则无需编码
|
||||
if (!this.mustBeRefresh) {
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int totalLength = 0;
|
||||
|
||||
// 编码 TLV-LENGTH
|
||||
int tmplen = encoder.prependVarNumber(new VlInt(totalLength));
|
||||
if (tmplen <= 0) {
|
||||
if (tmplen < 0) {
|
||||
return -1;
|
||||
}
|
||||
totalLength += tmplen;
|
||||
|
||||
// 编码 TLV-TYPE
|
||||
tmplen = encoder.prependVarNumber(new VlInt(TLV.TlvMustBeRefresh));
|
||||
if (tmplen <= 0) {
|
||||
if (tmplen < 0) {
|
||||
return -1;
|
||||
}
|
||||
totalLength += tmplen;
|
||||
|
||||
Reference in new issue
Block a user