public void FixtureSetup() { keys = new List <string>(); server = new MonoTorrent.Tracker.Tracker(); server.AllowUnregisteredTorrents = true; listener = new MonoTorrent.Tracker.Listeners.UdpListener(6767); listener.AnnounceReceived += delegate(object o, MonoTorrent.Tracker.AnnounceParameters e) { keys.Add(e.Key); }; server.RegisterListener(listener); listener.Start(); }
public UdpTrackerTests() { keys = new List<string>(); server = new MonoTorrent.Tracker.Tracker(); server.AllowUnregisteredTorrents = true; listener = new MonoTorrent.Tracker.Listeners.UdpListener(6767); listener.AnnounceReceived += delegate(object o, MonoTorrent.Tracker.AnnounceParameters e) { keys.Add(e.Key); }; server.RegisterListener(listener); listener.Start(); keys.Clear(); }