public bool SendDtu(Socket soc, byte[] Root, String ip, int port) { WeaveBase.WeaveSession b = new WeaveBase.WeaveSession(); b.Request = "dtu"; b.Token = ip + "|" + port; b.SetRoot <byte[]>(Root); b.Querycount = 0; return(Send(soc, 0x00, b.Getjson())); }
public bool SendRoot <T>(byte command, String Request, T Root, int Querycount) { WeaveBase.WeaveSession b = new WeaveBase.WeaveSession(); b.Request = Request; b.Token = this.Tokan; b.SetRoot <T>(Root); b.Querycount = Querycount; return(send(command, b.Getjson())); }
public bool SendRoot <T>(Socket soc, byte command, String Request, T Root, int Querycount, String Tokan) { WeaveBase.WeaveSession b = new WeaveBase.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); }