public void RemoveBinding()
 {
     Assert.AreEqual(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 21), new IPEndPoint(IPAddress.Parse("127.0.0.1"), 21));
     var listener = new Listener();
     listener.AddBinding(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 21));
     listener.RemoveBinding(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 21));
     Assert.AreEqual(0, listener.Bindings.Count);
 }
        //----------------------------------------------------------------
        //TRAP RECEIVER
        public void TrapListen()
        {
            Listener server = new Listener();
            server.Start();
            server.MessageReceived += Message;

            Thread.Sleep(10000);
            server.Stop();

        }
Example #3
-1
 /// <summary>
 /// Initializes a new instance of the <see cref="SnmpEngine"/> class.
 /// </summary>
 /// <param name="factory">The factory.</param>
 /// <param name="listener">The listener.</param>
 /// <param name="group">Engine core group.</param>
 public SnmpEngine(SnmpApplicationFactory factory, Listener listener, EngineGroup group)
 {
     _factory = factory;
     Listener = listener;
     _group = group;
 }