没有功能也要把数据读完,否则无线循环下去,必然出错

This commit is contained in:
WangQiang 2015-11-26 12:31:55 +00:00
parent f9f98585fc
commit 61f720ed02
1 changed files with 4 additions and 0 deletions

View File

@ -332,6 +332,7 @@ bool TinyServer::OnPing(const TinyMessage& msg)
switch(ms.ReadByte()) switch(ms.ReadByte())
{ {
// 同步数据 // 同步数据
// 没有功能也要把数据读完,否则无线循环下去,必然出错
case 0x01: case 0x01:
{ {
byte offset = ms.ReadByte(); byte offset = ms.ReadByte();
@ -350,6 +351,9 @@ bool TinyServer::OnPing(const TinyMessage& msg)
} }
case 0x02: case 0x02:
{ {
byte offset = ms.ReadByte();
byte len = ms.ReadByte();
ms.SetPosition(ms.Position() + len);
break; break;
} }
case 0x03: case 0x03: