MCPcopy Create free account
hub / github.com/Windscribe/Desktop-App / readAllFromPipe

Function readAllFromPipe

src/client/client-common/utils/winutils.cpp:433–454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

431}
432
433static std::string readAllFromPipe(HANDLE hPipe)
434{
435 const int BUFFER_SIZE = 1024;
436 std::string csoutput;
437 while (true)
438 {
439 char buf[BUFFER_SIZE + 1];
440 DWORD readword;
441 if (!::ReadFile(hPipe, buf, BUFFER_SIZE, &readword, 0))
442 {
443 break;
444 }
445 if (readword == 0)
446 {
447 break;
448 }
449 buf[readword] = '\0';
450 std::string cstemp = buf;
451 csoutput += cstemp;
452 }
453 return csoutput;
454}
455
456QString WinUtils::executeBlockingCmd(QString cmd, const QString & /*params*/, int timeoutMs)
457{

Callers 2

executeBlockingCmdMethod · 0.70
sendCmdMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected