MCPcopy Create free account
hub / github.com/BlueAndi/Pixelix / processCmdQueue

Method processCmdQueue

lib/AsyncHttpClient/src/AsyncHttpClient.cpp:605–642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

603}
604
605void AsyncHttpClient::processCmdQueue()
606{
607 if (true == takeGlobalMutex())
608 {
609 Cmd cmd;
610
611 if (true == m_cmdQueue.receive(&cmd, 0U))
612 {
613 switch (cmd.id)
614 {
615 case CMD_ID_GET:
616 if (false == getRequest())
617 {
618 onError(ERR_CONN);
619 notifyClosed();
620 giveGlobalMutex();
621 }
622 break;
623
624 case CMD_ID_POST:
625 if (false == postRequest(cmd.u.data.data, cmd.u.data.size))
626 {
627 onError(ERR_CONN);
628 notifyClosed();
629 giveGlobalMutex();
630 }
631 break;
632
633 default:
634 break;
635 };
636 }
637 else
638 {
639 giveGlobalMutex();
640 }
641 }
642}
643
644void AsyncHttpClient::processEvtQueue()
645{

Callers 1

processTaskMethod · 0.80

Calls 1

receiveMethod · 0.80

Tested by

no test coverage detected