LLVM 22.0.0git
|
A transport class that performs the JSON-RPC communication with the LSP client. More...
#include "llvm/Support/LSP/Transport.h"
Public Member Functions | |
JSONTransport (std::unique_ptr< JSONTransportInput > In, raw_ostream &Out, bool PrettyOutput=false) | |
JSONTransport (std::FILE *In, raw_ostream &Out, JSONStreamStyle Style=JSONStreamStyle::Standard, bool PrettyOutput=false) | |
void | notify (StringRef Method, llvm::json::Value Params) |
The following methods are used to send a message to the LSP client. | |
void | call (StringRef Method, llvm::json::Value Params, llvm::json::Value Id) |
void | reply (llvm::json::Value Id, llvm::Expected< llvm::json::Value > Result) |
llvm::Error | run (MessageHandler &Handler) |
Start executing the JSON-RPC transport. |
A transport class that performs the JSON-RPC communication with the LSP client.
Definition at line 93 of file Transport.h.
|
inline |
Definition at line 95 of file Transport.h.
References llvm::move().
|
inline |
Definition at line 99 of file Transport.h.
References llvm::lsp::Standard.
void JSONTransport::call | ( | StringRef | Method, |
llvm::json::Value | Params, | ||
llvm::json::Value | Id ) |
Definition at line 183 of file Transport.cpp.
References llvm::lsp::Method.
void JSONTransport::notify | ( | StringRef | Method, |
llvm::json::Value | Params ) |
The following methods are used to send a message to the LSP client.
Definition at line 176 of file Transport.cpp.
References llvm::lsp::Method.
void JSONTransport::reply | ( | llvm::json::Value | Id, |
llvm::Expected< llvm::json::Value > | Result ) |
Definition at line 192 of file Transport.cpp.
References encodeError().
llvm::Error JSONTransport::run | ( | MessageHandler & | Handler | ) |
Start executing the JSON-RPC transport.
Definition at line 209 of file Transport.cpp.
References llvm::lsp::Logger::error(), llvm::errorCodeToError(), llvm::json::parse(), llvm::succeeded(), llvm::Error::success(), and llvm::toString().