diff options
Diffstat (limited to 'graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageProducer.h')
-rw-r--r-- | graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageProducer.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageProducer.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageProducer.h index 2affe3b3ff..4f3799555a 100644 --- a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageProducer.h +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageProducer.h @@ -2,11 +2,18 @@ #include <string> #include <functional> +namespace lsp { + /// The encoding style of the JSON-RPC messages (both input and output). + enum JSONStreamStyle { + /// Encoding per the LSP specification, with mandatory Content-Length header. + Standard, + /// Messages are delimited by a '// -----' line. Comment lines start with //. + Delimited + }; +} class MessageProducer { public: - - typedef std::function< void(std::string&&) > MessageConsumer; virtual ~MessageProducer() = default; virtual void listen(MessageConsumer) = 0; |