Пример #1
0
        public void LaunchDaemon(File daemonLauncher)
        {
            var lines = daemonLauncher.Content.Split(new string[] { "\r\n" }, StringSplitOptions.None);

            if (lines[0] == "IRC")
            {
                var newDaemon = new IrcDaemon(NextPID, null, this, new Credentials(GetUserId("guest"), Group.GUEST));
                daemons.Add(newDaemon);
            }
            else if (lines[0] == "DNS")
            {
                var newDaemon = new DNSDaemon(NextPID, null, this, new Credentials(GetUserId("guest"), Group.GUEST));
                daemons.Add(newDaemon);
            }
            else if (lines[0] == "HTTP")
            {
                var newDaemon = new HTTPDaemon(NextPID, null, this, new Credentials(GetUserId("guest"), Group.GUEST));
                daemons.Add(newDaemon);
            }
            else if (lines[0] == "BANK")
            {
                var newDaemon = new BankDaemon(NextPID, null, this, new Credentials(GetUserId("guest"), Group.GUEST));
                daemons.Add(newDaemon);
            }
        }
Пример #2
0
        public void LaunchDaemon(File daemonLauncher)
        {
            var lines = daemonLauncher.Content.Split(new string[] { "\r\n" }, StringSplitOptions.None);

            if (lines[0] == "IRC")
            {
                var newDaemon = new IrcDaemon(this);
                daemons.Add(newDaemon);
            }
            else if (lines[0] == "DNS")
            {
                var newDaemon = new DNSDaemon(this);
                daemons.Add(newDaemon);
            }
            else if (lines[0] == "HTTP")
            {
                var newDaemon = new HTTPDaemon(this);
                daemons.Add(newDaemon);
            }
        }
Пример #3
0
 public HTTPSession(HTTPDaemon daemon, Session session)
 {
     this.session = session;
     this.daemon  = daemon;
 }