public static void CallConnectionRejected(this PeerConnectorHooks hooks, NetworkAddress remote) { hooks.OnConnectionRejected?.Invoke(new ConnectionRejected { Remote = remote }); }
public PeerConnectorContext(PeerConnectorDependencies dependencies, PeerConnectorHooks hooks, PeerConnectorConfiguration configuration) { this.dependencies = dependencies; this.hooks = hooks; this.configuration = configuration; queue = new LeakQueue <PeerConnectorContext>(this); }
public static void CallConnectionEstablished(this PeerConnectorHooks hooks, NetworkConnection connection) { hooks.OnConnectionEstablished?.Invoke(new ConnectionEstablished { Remote = connection.Remote, Connection = connection }); }
public PeerConnector(PeerConnectorDependencies dependencies, PeerConnectorHooks hooks, PeerConnectorConfiguration configuration) { context = new PeerConnectorContext(dependencies, hooks, configuration); }
public PeerConnector Build(PeerConnectorHooks hooks) { return(new PeerConnector(dependencies, hooks, configuration)); }