* Sends a single argument comment * @param socket socket unique ptr. * @param op operation to perform * @param value value to send */
| 31 | * @param value value to send |
| 32 | */ |
| 33 | bool sendSingleCommand(std::unique_ptr<minifi::io::Socket> socket, uint8_t op, const std::string value) { |
| 34 | socket->initialize(); |
| 35 | std::vector<uint8_t> data; |
| 36 | minifi::io::BufferStream stream; |
| 37 | stream.write(&op, 1); |
| 38 | stream.write(value); |
| 39 | return socket->write(const_cast<uint8_t*>(stream.getBuffer()), gsl::narrow<int>(stream.size())) == stream.size(); |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * Stops a stopped component |
no test coverage detected