Пример #1
0
        public IPeer Connect(AgentId id)
        {
            if (Account.IsConnectedTo(id))
            {
                return(Account.GetPeer(id));
            }
            var newPeer = _network.FindAgent(id).AsPeer();

            Account.AddPeer(newPeer);
            SyncPeer(newPeer);
            OnAddedConnection(id);
            return(newPeer);
        }