public ListenerFixture() { pipeline = new LeakPipeline(); pipeline.Start(); worker = new CompletionThread(); worker.Start(); pool = new NetworkPoolBuilder() .WithPipeline(pipeline) .WithWorker(worker) .WithMemory(new ListenerMemory()) .Build(); pool.Start(); hooks = new PeerListenerHooks(); }
private void StartListener() { if (Settings.Listener) { PeerListenerHooks hooks = new PeerListenerHooks { OnConnectionArrived = OnConnectionArrived, OnListenerStarted = OnListenerStarted, OnListenerFailed = OnListenerFailed }; Listener = new PeerListenerBuilder() .WithNetwork(Network) .WithPort(Settings) .Build(hooks); Listener.Start(); } }