Example #1
0
void mesh_http_proto_parser(void *arg, uint8_t *pdata, uint16_t len)
{
    uint16_t i = 0;
    uint16_t url_count = 0;
    const char *url_req = NULL;

    MESH_PARSER_PRINT("%s, len:%u, data:%s\n", __func__, len, pdata);
    /*
     * check the complete of http packet
     */
    // mesh_http_check_complete(..., &url_req)
    
    /*
     *  parser url according to the url table
     */
    url_count = sizeof(g_url_tab) / sizeof(g_url_tab[0]);

    for (i = 0; i < url_count; i ++) {
        if (g_url_tab[i].url && url_req &&
            os_strcmp(g_url_tab[i].url, url_req) == 0) {
            /*
            if (g_url_tab[i].url_handler)
                g_url_tab[i].url_handler(...);
            */
            break;
        }
    }
}
Example #2
0
void ICACHE_FLASH_ATTR
mesh_bin_proto_parser(const void *mesh_header, uint8_t *pdata, uint16_t len)
{
    MESH_PARSER_PRINT("%s\n", __func__);
}
Example #3
0
void url_test1_handler(void *arg)
{
    MESH_PARSER_PRINT("%s\n", __func__);
}
Example #4
0
void ICACHE_FLASH_ATTR url_test1_handler(void *arg)
{
    MESH_PARSER_PRINT("%s\n", __func__);
}