Beispiel #1
0
        public void AddStack(ServerStack s)
        {
            ThreadPool.QueueUserWorkItem((x) =>
            {
                bool notfound = true;
                while (notfound)
                {
                    lock (RegistorSS)
                    {
                        foreach (var i in RegistorSS)
                        {
                            if (i.HandlerID == s.HandlerID)
                            {
                                byte[] buf = new Load() {  URL = "http://localhost/" + s.DLL }.Write();

                                i.NetS.Write(buf, 0, buf.Length);

                                Thread.Sleep(10);

                                byte[] buf1 = new Run() {  Data = s.DLL }.Write();

                                i.NetS.Write(buf1, 0, buf1.Length);

                                notfound = false;
                                break;
                            }
                        }
                    }
                }
            });
        }
        /*
            MyvarHD,
            This class must handle ServerStacks:
            1. registor all server stacks - this includes Security
            2. send registored stacks dll's, and start them
            3. handle requests from stack information, for eg, the front stack may ask the main from for the backend stacks public port and address

            Security:
            the main frame will have some kind of a key file, so when a new stack is deloyed it is installed with the key file

            i was th

        */
        /// <summary>
        /// Use this to Registor a new Stack
        /// </summary>
        /// <param name="s">Stack object</param>
        public void AddStack(ServerStack s)
        {
            MFSS.AddStack(s);
        }
Beispiel #3
0
 public SFP(ServerStack ss)
 {
     SS = ss;
     _client.DataRecived = new Action<byte[]>(HandleData);
     _client.Disconected = new Action(Connected);
 }