public ConnectorSession Start() { PeerConnector connector = new PeerConnectorBuilder() .WithPipeline(pipeline) .WithNetwork(pool) .Build(hooks); connector.Start(); return(new ConnectorSession(pool, connector)); }
private void StartConnector() { PeerConnectorHooks hooks = new PeerConnectorHooks { OnConnectionEstablished = OnConnectionEstablished }; Connector = new PeerConnectorBuilder() .WithNetwork(Network) .WithPipeline(Pipeline) .Build(hooks); Connector.Start(); }