public Server(string id, string address, int port, List<string> knownReplicas, string knownChordAddress, int knownChordPort) { RemotingConfiguration.Configure("../../../App.config", true); IDictionary t = new Hashtable(); t.Add("timeout", (uint)75000); t.Add("port", port); TcpChannel channel = new TcpChannel(t, null, null); ChannelServices.RegisterChannel(channel, false); this.id = id; this.address = address; this.port = port; Exit = false; string folderName = address.Split("://".ToCharArray())[3] + "." + port; serverDB = new DataBase(folderName, "server.db"); replicas = new List<string>(knownReplicas); serverRequestManager = new ServerRequestManager(); cn = new ChordNode(address, port, knownChordAddress, knownChordPort); }
public Server(string id, string address, int port, List <string> knownReplicas, string knownChordAddress, int knownChordPort) { RemotingConfiguration.Configure("../../../App.config", true); IDictionary t = new Hashtable(); t.Add("timeout", (uint)75000); t.Add("port", port); TcpChannel channel = new TcpChannel(t, null, null); ChannelServices.RegisterChannel(channel, false); this.id = id; this.address = address; this.port = port; Exit = false; string folderName = address.Split("://".ToCharArray())[3] + "." + port; serverDB = new DataBase(folderName, "server.db"); replicas = new List <string>(knownReplicas); serverRequestManager = new ServerRequestManager(); cn = new ChordNode(address, port, knownChordAddress, knownChordPort); }