public static void RemoveClient(SuperPeerClient client)
 {
     lock (_peersMonitor)
     {
         _clients.Remove(client);
     }
 }
Example #2
0
 public static void AddClient(SuperPeerClient client)
 {
     lock (_peersMonitor)
     {
         _clients.Add(client);
     }
 }
Example #3
0
 public static void RemoveClient(SuperPeerClient client)
 {
     lock (_peersMonitor)
     {
         _clients.Remove(client);
     }
 }
 public static void AddClient(SuperPeerClient client)
 {
     lock (_peersMonitor)
     {
         _clients.Add(client);
     }
 }
        private SuperPeerNode GetSuperPeerNodeByClientType(ClientType clientType)
        {
            SuperPeerNode superPeerNode;

            if (clientType == ClientType.Client)            
                superPeerNode = new SuperPeerClient(_superPeer, _client);            
            else
                superPeerNode = new SuperPeerServer(_superPeer, _client);

            return superPeerNode;
        }
Example #6
0
        private ConnectionPair CreateConnectionPair(SuperPeerServer server, SuperPeerClient client)
        {
            ConnectionPair connectionPair = new ConnectionPair(server, client);

            if (!ConnectionsRepository.GetConnections().Contains(connectionPair))
            {
                ConnectionsRepository.AddConnection(connectionPair);
                return(connectionPair);
            }

            return(null);
        }
        private ConnectionPair CreateConnectionPair(SuperPeerServer server, SuperPeerClient client)
        {
            ConnectionPair connectionPair = new ConnectionPair(server, client);

            if (!ConnectionsRepository.GetConnections().Contains(connectionPair))
            {
                ConnectionsRepository.AddConnection(connectionPair);
                return connectionPair;
            }

            return null;
        }
Example #8
0
        private SuperPeerNode GetSuperPeerNodeByClientType(ClientType clientType)
        {
            SuperPeerNode superPeerNode;

            if (clientType == ClientType.Client)
            {
                superPeerNode = new SuperPeerClient(_superPeer, _client);
            }
            else
            {
                superPeerNode = new SuperPeerServer(_superPeer, _client);
            }

            return(superPeerNode);
        }
Example #9
0
 public ClientMessageManager(SuperPeerClient superPeerClient)
 {
     _superPeerClient = superPeerClient;
 }
 public Connection(SuperPeerServer server, SuperPeerClient client)
 {
     Server = server;
     Client = client;
 }
 public Connection(SuperPeerServer server, SuperPeerClient client)
 {
     Server = server;
     Client = client;
 }
Example #12
0
 public TcpConnection(SuperPeerServer server, SuperPeerClient client)
     : base(server, client)
 {            
 }
 public ClientMessageManager(SuperPeerClient superPeerClient)
 {
     _superPeerClient = superPeerClient;
 }
Example #14
0
 public TcpConnection(SuperPeerServer server, SuperPeerClient client)
     : base(server, client)
 {
 }