Exemplo n.º 1
0
 public static void CallConnectionRejected(this PeerConnectorHooks hooks, NetworkAddress remote)
 {
     hooks.OnConnectionRejected?.Invoke(new ConnectionRejected
     {
         Remote = remote
     });
 }
Exemplo n.º 2
0
        public PeerConnectorContext(PeerConnectorDependencies dependencies, PeerConnectorHooks hooks, PeerConnectorConfiguration configuration)
        {
            this.dependencies  = dependencies;
            this.hooks         = hooks;
            this.configuration = configuration;

            queue = new LeakQueue <PeerConnectorContext>(this);
        }
Exemplo n.º 3
0
 public static void CallConnectionEstablished(this PeerConnectorHooks hooks, NetworkConnection connection)
 {
     hooks.OnConnectionEstablished?.Invoke(new ConnectionEstablished
     {
         Remote     = connection.Remote,
         Connection = connection
     });
 }
Exemplo n.º 4
0
 public PeerConnector(PeerConnectorDependencies dependencies, PeerConnectorHooks hooks, PeerConnectorConfiguration configuration)
 {
     context = new PeerConnectorContext(dependencies, hooks, configuration);
 }
Exemplo n.º 5
0
 public PeerConnector Build(PeerConnectorHooks hooks)
 {
     return(new PeerConnector(dependencies, hooks, configuration));
 }