public SocketSniffer(ProgramFlowManager programFlowManager) { this.programFlowManager = programFlowManager; outputQueue = new ConcurrentQueue <TimestampedData>(); TokenSource = new CancellationTokenSource(); }
public Form1() { Iphlpapi = new ProgramFlowManager(); InitializeComponent(); listBox1.DrawItem += ListBox1_DrawItem; listBox1.DataSource = Iphlpapi.programFlowsList; var networkInterfaces = NetworkInterfaceInfo.GetInterfaces(); comboBox1.DataSource = networkInterfaces; sn = new SocketSniffer(Iphlpapi); sn.Error += Sn_Error; sn.init(networkInterfaces); }