Esempio n. 1
0
        private int check_proto_type()
        {
            string content = "";

            if ((content = Proto.parseJson(recv_buffer)) != "")
            {
                rich_text_recv_data.Text = content;
                return(proto_type_map["json"]);
            }
            else if ((content = Proto.parseXML(recv_buffer)) != "")
            {
                rich_text_recv_data.Text = content;
                return(proto_type_map["xml"]);
            }
            else if (hex_handle())
            {
                return(proto_type_map["hex"]);
            }
            else if (is_hex_str())
            {
                return(proto_type_map["hex_string"]);
            }
            return(proto_type_map["string"]);
        }
Esempio n. 2
0
 private void json_handle()
 {
     rich_text_recv_data.Text = Proto.parseJson(recv_buffer);
 }