-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathScanEventArgs.cs
More file actions
executable file
·95 lines (75 loc) · 2.39 KB
/
Copy pathScanEventArgs.cs
File metadata and controls
executable file
·95 lines (75 loc) · 2.39 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
namespace ST.Library.Network
{
public class ScanEventArgs : EventArgs
{
private uint _TaskID;
public uint TaskID {
get { return _TaskID; }
internal set { _TaskID = value; }
}
private bool _CanConnect;
public bool CanConnect {
get { return _CanConnect; }
}
private EndPoint _EndPoint;
public EndPoint EndPoint {
get { return _EndPoint; }
}
private string _Protocol;
public string Protocol {
get { return _Protocol; }
}
private int _RegexLine;
public int RegexLine {
get { return _RegexLine; }
}
private string _Banner;
/// <summary>
/// banner信息
/// </summary>
public string Banner {
get { return _Banner; }
}
private byte[] _Data;
public byte[] Data {
get { return _Data; }
}
private int _Length;
public int Length {
get { return _Length; }
}
private string _ErrorMessage;
/// <summary>
/// 连接过程中最后一次错误信息
/// </summary>
public string ErrorMessage {
get { return _ErrorMessage; }
}
public ScanEventArgs(uint uid, EndPoint endPoint, string strError) {
this._TaskID = uid;
this._EndPoint = endPoint;
this._ErrorMessage = strError;
this._CanConnect = false;
}
public ScanEventArgs(uint uid, EndPoint endPoint, bool bCanConnect, string strError) {
this._TaskID = uid;
this._CanConnect = bCanConnect;
this._ErrorMessage = strError;
this._EndPoint = endPoint;
}
public ScanEventArgs(uint uid, EndPoint endPoint, string strPro, int nRegexLine, string strBanner, byte[] byData, int nLen) {
this._TaskID = uid;
this._EndPoint = endPoint;
this._Protocol = strPro;
this._RegexLine = nRegexLine;
this._Banner = strBanner;
this._Data = byData;
this._Length = nLen;
this._CanConnect = true;
}
}
}