SocketOpt.cs
1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using System.Net.Sockets;
namespace RCS.Model.Comm
{
/// <summary>
/// Socket处理实体
/// </summary>
public class SocketOpt
{
/// <summary>
/// 接收的报文数据
/// </summary>
public byte[] RecData { get; set; }
/// <summary>
/// 发送的报文数据
/// </summary>
public byte[]? SendData { get; set; }
/// <summary>
/// 客户端对象
/// </summary>
public Socket ClientSocket { get; set; }
/// <summary>
/// 客户端的IP地址
/// </summary>
public string ClientIp { get; set; }
/// <summary>
/// 处理时间
/// </summary>
public int DealTime { get; set; }
/// <summary>
/// 设备编号
/// </summary>
public string? EquipmentNo;
/// <summary>
/// Socket处理实体
/// </summary>
/// <param name="SClient">客户端对象</param>
/// <param name="Rec">报文信息</param>
public SocketOpt(Socket socket, string clientIp, byte[] receive)
{
ClientSocket = socket;
ClientIp = clientIp;
RecData = receive;
}
}
}