MCPcopy Create free account
hub / github.com/Icinga/icinga2 / SendRawMessage

Method SendRawMessage

lib/remote/jsonrpc.cpp:89–97  ·  view source on GitHub ↗

* Sends a raw message to the connected peer. * * @param stream ASIO TLS Stream * @param json message * @param yc Yield context required for ASIO * * @return bytes sent */

Source from the content-addressed store, hash-verified

87 * @return bytes sent
88 */
89size_t JsonRpc::SendRawMessage(const Shared<AsioTlsStream>::Ptr& stream, const String& json, boost::asio::yield_context yc)
90{
91#ifdef I2_DEBUG
92 if (GetDebugJsonRpcCached())
93 std::cerr << ConsoleColorTag(Console_ForegroundBlue) << ">> " << json << ConsoleColorTag(Console_Normal) << "\n";
94#endif /* I2_DEBUG */
95
96 return NetString::WriteStringToStream(stream, json, yc);
97}
98
99/**
100 * Reads a message from the connected peer.

Callers 1

ReplayLogMethod · 0.45

Calls 2

GetDebugJsonRpcCachedFunction · 0.85
ConsoleColorTagClass · 0.85

Tested by

no test coverage detected