Exemple #1
0
        public static void Main(string[] args)
        {
            string mongoUri = Environment.GetEnvironmentVariable("MONGO_URI");

            SQLiteConnect.SetupDicts();
            MongoDBConnect.SetupConnect(mongoUri);
            Properties.Settings settings = Properties.Settings.Default;
            FrontendConnect     c        = new FrontendConnect(settings.username, settings.pin.ToString(), 1);

            c.Login();
            c.jp.Join();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            PacketDevice selectedDevice = GetDevice();

            string mongoUri = Environment.GetEnvironmentVariable("MONGO_URI");

            MongoDBConnect.SetupConnect(mongoUri);

            //Open the device with a 65kB buffer, promiscuous mode, 1s timeout
            using (PacketCommunicator communicator = selectedDevice.Open(65536, PacketDeviceOpenAttributes.Promiscuous, 1000))
            {
                Console.WriteLine("Waiting for TCP stream to start on {0}", selectedDevice.Description);

                communicator.SetFilter(filter);

                // Retrieve the packets
                communicator.ReceivePackets(0, HandlePacketPort);
            }
        }