/* This function is called when new websocket is open and creates a new websocket_task if requested URI equals '/stream'.  */
void websocket_open_cb(struct tcp_pcb *pcb, const char *uri)
/* This function is called when new websocket is open and creates a new websocket_task if requested URI equals '/stream'.  */
void websocket_open_cb(struct tcp_pcb *pcb, const char *uri)
{
    printf("WS URI: %s\n", uri);
    if (!strcmp(uri, "/stream")) {
        printf("request for streaming\n");
        xTaskCreate(&websocket_task, "websocket_task", 256, (void *) pcb, 2, NULL);
    }
}