markiodev / Networker

A simple to use TCP and UDP networking library for .NET. Compatible with Unity.
MIT License
478 stars 77 forks source link

ServerPacketProcessor处理无长度数据包时陷入循环 #54

Open qinqoushui opened 4 years ago

qinqoushui commented 4 years ago

var packetSize = packetSerialiser.CanReadLength ? BitConverter.ToInt32(buffer, currentPosition) : 0; //包长度后续没赋值,在不能读取长度的业务中陷入循环,如果数据包没有长度说明,则使用整包的长度 var packetSize = packetSerialiser.CanReadLength ? BitConverter.ToInt32(buffer, currentPosition) : length;