| | |
| | | /// </summary> |
| | | public int HaveSendCount; |
| | | |
| | | public delegate void DelegateReceive (byte subnetID, byte deviceID, Command command, byte [] usefullBytes, int deviceType); |
| | | public delegate void DelegateReceive (byte subnetID, byte deviceID, Command command, byte [] usefullBytes, int deviceType, System.Net.IPEndPoint remoteIp); |
| | | public static event DelegateReceive ReceiveEvent; |
| | | /// <summary> |
| | | /// 接收到的所有数据 |
| | |
| | | |
| | | if (ReceiveEvent != null) { |
| | | try { |
| | | ReceiveEvent (subnetID, deviceID, command, usefulBytes, deviceType); |
| | | ReceiveEvent (subnetID, deviceID, command, usefulBytes, deviceType,(System.Net.IPEndPoint)RemoteEndPoint); |
| | | } catch (Exception ex) { |
| | | Console.WriteLine (ex.Message); |
| | | } |