* 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 */
| 87 | * @return bytes sent |
| 88 | */ |
| 89 | size_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. |
no test coverage detected