| 235 | } |
| 236 | |
| 237 | bool LuxControlConnection::Command(const std::string &cmd, const ReplyHandlerCB& reply_handler) |
| 238 | { |
| 239 | if (!b_conn) |
| 240 | return false; |
| 241 | struct evbuffer *buf = bufferevent_get_output(b_conn); |
| 242 | if (!buf) |
| 243 | return false; |
| 244 | evbuffer_add(buf, cmd.data(), cmd.size()); |
| 245 | evbuffer_add(buf, "\r\n", 2); |
| 246 | reply_handlers.push_back(reply_handler); |
| 247 | return true; |
| 248 | } |
| 249 | |
| 250 | static std::pair<std::string,std::string> SplitLuxReplyLine(const std::string &s) |
| 251 | { |
no test coverage detected