标签:ssi soc 使用 lis class 服务端 tar tcp 自定义
AsyncTcpSession tcpSession = new AsyncTcpSession(); public Encoding encoding = Encoding.GetEncoding("gb2312"); List<byte> senddata = new List<byte>(); senddata.AddRange(encoding.GetBytes("!Start"));//Start senddata.Add(0);//key string value = "my clint 123"; byte[] body = encoding.GetBytes(value); uint len = (uint)body.Length; senddata.AddRange(BitConverter.GetBytes(len));//Lenght uint DeviceUDID = 1; senddata.AddRange(BitConverter.GetBytes(DeviceUDID));//DeviceUDID senddata.Add(2);//Type senddata.AddRange(body);//Body senddata.AddRange(encoding.GetBytes("$End"));//End Send(senddata.ToArray());
标签:ssi soc 使用 lis class 服务端 tar tcp 自定义
原文地址:https://www.cnblogs.com/dotnet1990/p/9583364.html