Exemplo n.º 1
0
        static void Main(string[] args)
        {
            UdpServerNetFlow udpServerNetFlow = new UdpServerNetFlow(9999);

            udpServerNetFlow.OnNewPackage += UdpServerNetFlow_OnNewPackage;
            udpServerNetFlow.Start();
            Console.ReadKey();
        }
 protected override void OnStart(string[] args)
 {
     try
     {
         conn_param       = $"Server={Properties.Settings.Default.PGHost};Port={Properties.Settings.Default.PGPort};User Id={Properties.Settings.Default.PGLogin};Password={Properties.Settings.Default.PGPassword};Database={Properties.Settings.Default.PGDatabase};";
         udpServerNetFlow = new UdpServerNetFlow(Properties.Settings.Default.NetFlowUDPPort);
         udpServerNetFlow.OnNewPackage += UdpServerNetFlow_OnNewPackage;
         udpServerNetFlow.Start();
     }
     catch (Exception ex)
     {
         Logs.Write(ex);
         OnStop();
     }
 }