|
|
@@ -110,7 +110,7 @@ namespace NearCardAttendance.Service.TcpServer.Handler |
|
|
|
// Console.WriteLine(message); |
|
|
|
} |
|
|
|
// 过长且不完整 |
|
|
|
if (inputString.Length > messageLength) |
|
|
|
if (inputString.Length > messagesStringLength) |
|
|
|
{ |
|
|
|
var overLongbuffer = Unpooled.Buffer(); |
|
|
|
overLongbuffer.WriteBytes(Unpooled.WrappedBuffer(Encoding.ASCII.GetBytes(inputString.Substring(messageLength, inputString.Length- messageLength)))); |
|
|
@@ -118,7 +118,7 @@ namespace NearCardAttendance.Service.TcpServer.Handler |
|
|
|
buffer = overLongbuffer; |
|
|
|
} |
|
|
|
// 数据完整 |
|
|
|
if (inputString.Length ==messageLength) |
|
|
|
if (inputString.Length == messagesStringLength) |
|
|
|
{ |
|
|
|
ReleaseBuffer(); |
|
|
|
} |
|
|
|