Ejemplo n.º 1
0
        public bool SendDtu(Socket soc, byte[] Root, String ip, int port)
        {
            WeaveSession b = new WeaveSession();

            b.Request = "dtu";
            b.Token   = ip + "|" + port;
            b.SetRoot <byte[]>(Root);
            b.Querycount = 0;
            return(Send(soc, 0x00, b.Getjson()));
        }
Ejemplo n.º 2
0
        public bool SendRoot <T>(Socket soc, byte command, String Request, T Root, int Querycount, String Tokan)
        {
            WeaveSession b = new WeaveSession();

            b.Request = Request;
            b.Token   = Tokan;
            b.SetRoot <T>(Root);
            b.Querycount = Querycount;
            bool sendok = Send(soc, command, b);

            if (!sendok)
            {
                return(Send(soc, command, b.Getjson()));
            }
            return(sendok);
        }