Changeset View
Changeset View
Standalone View
Standalone View
addons/lspclient/lspclientserver.cpp
Show First 20 Lines • Show All 252 Lines • ▼ Show 20 Line(s) | 234 | { | |||
---|---|---|---|---|---|
253 | auto sjson = json.toJson(); | 253 | auto sjson = json.toJson(); | ||
254 | 254 | | |||
255 | qCInfo(LSPCLIENT) << "calling" << msg[MEMBER_METHOD].toString(); | 255 | qCInfo(LSPCLIENT) << "calling" << msg[MEMBER_METHOD].toString(); | ||
256 | qCDebug(LSPCLIENT) << "sending message:\n" << QString::fromUtf8(sjson); | 256 | qCDebug(LSPCLIENT) << "sending message:\n" << QString::fromUtf8(sjson); | ||
257 | // some simple parsers expect length header first | 257 | // some simple parsers expect length header first | ||
258 | auto hdr = QStringLiteral("Content-Length: %1\r\n").arg(sjson.length()); | 258 | auto hdr = QStringLiteral("Content-Length: %1\r\n").arg(sjson.length()); | ||
259 | // write is async, so no blocking wait occurs here | 259 | // write is async, so no blocking wait occurs here | ||
260 | m_sproc.write(hdr.toLatin1()); | 260 | m_sproc.write(hdr.toLatin1()); | ||
261 | m_sproc.write("Content-Type: application/vscode-jsonrpc; charset=utf-8\r\n\r\n"); | 261 | m_sproc.write("\r\n"); | ||
262 | m_sproc.write(sjson); | 262 | m_sproc.write(sjson); | ||
263 | 263 | | |||
264 | return ret; | 264 | return ret; | ||
265 | } | 265 | } | ||
266 | 266 | | |||
267 | RequestHandle | 267 | RequestHandle | ||
268 | send(const QJsonObject & msg, const GenericReplyHandler & h = nullptr) | 268 | send(const QJsonObject & msg, const GenericReplyHandler & h = nullptr) | ||
269 | { | 269 | { | ||
▲ Show 20 Lines • Show All 643 Lines • Show Last 20 Lines |