MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / sendSingleCommand

Function sendSingleCommand

controller/Controller.h:33–40  ·  view source on GitHub ↗

* Sends a single argument comment * @param socket socket unique ptr. * @param op operation to perform * @param value value to send */

Source from the content-addressed store, hash-verified

31 * @param value value to send
32 */
33bool 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

Callers 3

stopComponentFunction · 0.85
startComponentFunction · 0.85
clearConnectionFunction · 0.85

Calls 4

initializeMethod · 0.45
writeMethod · 0.45
getBufferMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected