新增IP校验逻辑,修复2遍存库BUG

master
CaesarBao 5 months ago
parent a84d7f3cf3
commit bd112df611

Binary file not shown.

@ -104,6 +104,10 @@ namespace CommService
while (i != 0) while (i != 0)
{ {
if (!IPAddress.Parse(((IPEndPoint)tcpClient.Client.RemoteEndPoint).Address.ToString()).ToString().Contains("112.224"))
{
break;
}
byte[] rcvbytes = new byte[i]; byte[] rcvbytes = new byte[i];
for (int j = 0; j < i; j++) for (int j = 0; j < i; j++)
{ {
@ -125,16 +129,16 @@ namespace CommService
rcvBuff = tmp; rcvBuff = tmp;
//数据包识别 //数据包识别
//byte[] pack = UPPHandler.FindPackFromBuff(ref rcvBuff); byte[] pack = UPPHandler.FindPackFromBuff(ref rcvBuff);
byte[] pack = new byte[rcvBuff.Length]; //byte[] pack = new byte[rcvBuff.Length];
Array.Copy(rcvBuff,0,pack,0, rcvBuff.Length); //Array.Copy(rcvBuff,0,pack,0, rcvBuff.Length);
if (this.tName == "未知终端" && pack.Length == 0) if (this.tName == "未知终端" && pack.Length == 0)
{ {
break; break;
} }
while (rcvBuff.Length > 0) while (pack.Length > 0)
{ {
Common.logFile.writeHexString("[" + this.tName + "] " + "收到帧: ", pack, LogFile.LOGLVL_DEBUG); Common.logFile.writeHexString("[" + this.tName + "] " + "收到帧: ", pack, LogFile.LOGLVL_DEBUG);

Loading…
Cancel
Save