licheedev / Android-SerialPort-API

Fork自Google开源的Android串口通信Demo,修改成Android Studio项目
https://code.google.com/archive/p/android-serialport-api/
Apache License 2.0
1.3k stars 374 forks source link

分包粘包求思路 #15

Closed xhanglizhu closed 5 years ago

losingline commented 5 years ago

先验证包头 再根据包头给的内容长度定分包的长度,包头验证失败的下延一位继续读