Пример #1
0
 public PassiveInMemoryPeer(InMemoryConnectionCenter center, ActiveInMemoryPeer peer) : base(center)
 {
     this.opposite          = peer;
     this.opposite.opposite = this;
     this.BaseAddress       = peer.TargetAddress;
     this.TargetAddress     = peer.BaseAddress;
 }
        internal bool Connect(ActiveInMemoryPeer peer)
        {
            var oppositePeer = new PassiveInMemoryPeer(this.center, peer);

            this.center.AddPeer(oppositePeer);
            this.OnPeerConnected?.Invoke(this, oppositePeer);
            return(true);
        }