MCPcopy Create free account
hub / github.com/MayaPosch/NymphCast / sendCommand

Method sendCommand

src/server/lcdapi/api/LCDClient.cpp:131–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void LCDClient::sendCommand(const std::string &cmd, const std::string &parameters)
132{
133 if (!cmd.empty())
134 {
135 const LCDLock l(&_sendMutex);
136
137 const string command = cmd + " " + parameters;
138
139 _serverConnection << command;
140
141 if (_sync) {
142 while (_answer.empty())
143 {
144 ::pthread_cond_wait(&_gotAnswer, &_sendMutex);
145 }
146
147 if (0 == _answer.find("huh?"))
148 {
149 throw LCDException(_answer.substr(5));
150 }
151 _answer.clear();
152 }
153 }
154}
155
156void LCDClient::disableSync()
157{

Callers

nothing calls this directly

Calls 4

LCDExceptionClass · 0.85
emptyMethod · 0.45
findMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected