Exemplo n.º 1
0
        public Master(Dictionary <int, string> slaves, UserStorageService service)
        {
            if (ReferenceEquals(service, null))
            {
                service = new UserStorageService();
            }

            this.service = service;
            this.slaves  = slaves;
        }
Exemplo n.º 2
0
        public Slave(int port, string ip, UserStorageService service)
        {
            if (ReferenceEquals(service, null))
            {
                service = new UserStorageService();
            }

            this.service = service;
            this.IPAddr  = ip;
            this.Port    = port;
            count++;

            Task.Run(() => this.CreateServer());
        }