nixd
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
lspserver::LSPServer Class Reference

#include <LSPServer.h>

Inheritance diagram for lspserver::LSPServer:
[legend]
Collaboration diagram for lspserver::LSPServer:
[legend]

Public Member Functions

 LSPServer (std::unique_ptr< InboundPort > In, std::unique_ptr< OutboundPort > Out)
 
void closeInbound ()
 Close the inbound port.
 
void run ()
 
void switchStreamStyle (JSONStreamStyle Style)
 
- Public Member Functions inherited from lspserver::MessageHandler
virtual ~MessageHandler ()=default
 

Protected Attributes

HandlerRegistry Registry
 
template<class T >
llvm::unique_function< void(const T &) mkOutNotifiction )(llvm::StringRef Method, OutboundPort *O=nullptr)
 
template<class ParamTy , class ResponseTy >
llvm::unique_function< void(const ParamTy &, Callback< ResponseTy >) mkOutMethod )(llvm::StringRef Method, OutboundPort *O=nullptr)
 

Detailed Description

LSPServer wraps inputs & outputs, associate message IDs between calls/reply, and provide type-safe interfaces.

Definition at line 17 of file LSPServer.h.

Constructor & Destructor Documentation

◆ LSPServer()

lspserver::LSPServer::LSPServer ( std::unique_ptr< InboundPort > In,
std::unique_ptr< OutboundPort > Out )
inline

Definition at line 87 of file LSPServer.h.

Member Function Documentation

◆ closeInbound()

void lspserver::LSPServer::closeInbound ( )
inline

Close the inbound port.

Definition at line 91 of file LSPServer.h.

Referenced by nixd::AttrSetClientProc::~AttrSetClientProc(), and nixd::OwnedEvalClient::~OwnedEvalClient().

◆ run()

void lspserver::LSPServer::run ( )

◆ switchStreamStyle()

void lspserver::LSPServer::switchStreamStyle ( JSONStreamStyle Style)
inline

Definition at line 94 of file LSPServer.h.

References lspserver::fromJSON().

Member Data Documentation

◆ mkOutMethod

template<class ParamTy , class ResponseTy >
llvm::unique_function< void(const ParamTy &, Callback< ResponseTy >) lspserver::LSPServer::mkOutMethod) (llvm::StringRef Method, OutboundPort *O=nullptr)
inlineprotected

Definition at line 69 of file LSPServer.h.

◆ mkOutNotifiction

template<class T >
llvm::unique_function< void(const T &) lspserver::LSPServer::mkOutNotifiction) (llvm::StringRef Method, OutboundPort *O=nullptr)
inlineprotected

Definition at line 58 of file LSPServer.h.

◆ Registry

HandlerRegistry lspserver::LSPServer::Registry
protected

Definition at line 55 of file LSPServer.h.

Referenced by nixd::Controller::Controller().


The documentation for this class was generated from the following files: