Hi,
In the file,ScadaData.Client.ServerComm.cs,there is a method,CheckUser,where,
buf[0] = (byte)(buf.Length % 256);
buf[1] = (byte)(buf.Length / 256);
buf[2] = 0x01;
buf[3] = userLen;
why “%256”, “/256”,what it is doing, I really do not understand.
And it is not the exception,there are many similar doing in other situations,such as in method,SendSrez,
byte[] buf = new byte[cmdLen];
buf[0] = (byte)(cmdLen % 256);
buf[1] = (byte)(cmdLen / 256);
buf[2] = 0x03;
buf[3] = (byte)(cnlCnt % 256);
buf[4] = (byte)(cnlCnt / 256);
-
This topic was modified 5 years, 3 months ago by Mikhail.