void BaseRequest::dispatch() { if (*static_cast<char*>(m_path + 1) == '\0') { sendLanding(); } else { sendStream(m_path + 1); } }
int main(int argc, char *argv[]) { BD_MANAGER_t *deviceManager = malloc(sizeof(BD_MANAGER_t)); printf("BD_MANAGER créé\n"); int failed = 0; char cmd='0'; // initialize jsMnager deviceManager->alManager = NULL; deviceManager->netManager = NULL; deviceManager->streamReader = NULL; deviceManager->rxThread = NULL; deviceManager->txThread = NULL; deviceManager->videoRxThread = NULL; deviceManager->videoTxThread = NULL; deviceManager->d2cPort = BD_D2C_PORT; deviceManager->c2dPort = BD_C2D_PORT; //deviceManager->c2dPort = 0; // Should be read from json deviceManager->run = 1; failed = ardiscoveryConnect (deviceManager); if(!failed) failed = startNetwork(deviceManager); else printf("Erreur ardiscoveryConnect\n"); if(!failed) { sendLanding(deviceManager); sleep(1); } if(!failed) stopNetwork(deviceManager); else printf("Erreur de StartNetwork\n"); return EXIT_SUCCESS; }