public static void CallListenerStarted(this PeerListenerHooks hooks, PeerListenerConfiguration configuration, int assignedPort) { hooks.OnListenerStarted?.Invoke(new ListenerStarted { Port = assignedPort }); }
public static void CallListenerFailed(this PeerListenerHooks hooks, PeerListenerConfiguration configuration, int requestedPort, string reason) { hooks.OnListenerFailed?.Invoke(new ListenerFailed { Port = requestedPort, Reason = reason }); }
public PeerListener(PeerListenerDependencies dependencies, PeerListenerHooks hooks, PeerListenerConfiguration configuration) { this.dependencies = dependencies; this.hooks = hooks; this.configuration = configuration; this.socket = dependencies.Network.New(); }
public PeerListenerBuilder() { dependencies = new PeerListenerDependencies(); configuration = new PeerListenerConfiguration(); }