fix:调整星图上线消息包结构
This commit is contained in:
parent
f91f1714c8
commit
a20206dfaf
@ -21,8 +21,7 @@ class MessageCommand {
|
|||||||
static int _maxIntValue = 9223372036854775807; // Dart 中 int 的最大值
|
static int _maxIntValue = 9223372036854775807; // Dart 中 int 的最大值
|
||||||
|
|
||||||
// 获取并递增消息ID
|
// 获取并递增消息ID
|
||||||
static int getNextMessageId(String toPeerId, {bool increment = true}) {
|
static int getNextMessageId(String toPeerId, {bool increment = true}) {
|
||||||
|
|
||||||
if (_messageIdMap.containsKey(toPeerId)) {
|
if (_messageIdMap.containsKey(toPeerId)) {
|
||||||
if (increment) {
|
if (increment) {
|
||||||
_messageIdMap[toPeerId] = _messageIdMap[toPeerId]! + 1;
|
_messageIdMap[toPeerId] = _messageIdMap[toPeerId]! + 1;
|
||||||
@ -51,7 +50,6 @@ class MessageCommand {
|
|||||||
SpIndex: 1,
|
SpIndex: 1,
|
||||||
FromPeerId: FromPeerId,
|
FromPeerId: FromPeerId,
|
||||||
ToPeerId: ToPeerId,
|
ToPeerId: ToPeerId,
|
||||||
Payload: [0],
|
|
||||||
PayloadCRC: 0,
|
PayloadCRC: 0,
|
||||||
PayloadLength: 0,
|
PayloadLength: 0,
|
||||||
PayloadType: PayloadTypeConstant.goOnline,
|
PayloadType: PayloadTypeConstant.goOnline,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user