public ProcessMonitor SetUpCloud()
        {
            List<Link> links = new List<Link>();
            CloudServer server = null;
            while (ConfigReader.Read())
            {
                if (ConfigReader.IsStartElement())
                {
                    if (ConfigReader.NodeType == XmlNodeType.Element)
                    {
                        if (ConfigReader.Name == "link")
                        {
                            links.Add(createLink(ConfigReader.ReadSubtree()));
                        }
                        else if (ConfigReader.Name == "server" && ConfigReader.IsStartElement())
                        {
                            int port = int.Parse(ConfigReader.GetAttribute("tcp"));
                            int buffer = int.Parse(ConfigReader.GetAttribute("buffer"));
                            int clientsNumber = int.Parse(ConfigReader.GetAttribute("clientsNumber"));
                            server = new CloudServer(port);
                            server.SetUpServer(buffer, clientsNumber);

                        }
                    }
                }
            }
            return new ProcessMonitor(server, links);
        }
Ejemplo n.º 2
0
 public ProcessMonitor(CloudServer Server, List <Link> Links)
 {
     this.Server = Server;
     this.Links  = Links;
     this.Server.HandleDataIncom += new HandleDataIncom(PullData);
 }
Ejemplo n.º 3
0
 public ProcessMonitor(CloudServer Server, List<Link> Links)
 {
     this.Server = Server;
     this.Links = Links;
     this.Server.HandleDataIncom += new HandleDataIncom(PullData);
 }