[fpc-pascal] JSON RPC send server request to client
Hairy Pixels
genericptr at gmail.com
Sun Oct 2 05:23:29 CEST 2022
> On Oct 2, 2022, at 9:16 AM, Michael Van Canneyt <michael at freepascal.org> wrote:
>
> There is no way to send data from server to client, only responses to client
> requests.
>
> What's more, HTTP 1 and 1.1 simplu do not allow this.
> You'd need HTTP2 and/or websockets in order to send data from server to client.
I mean with a standard IO pipe using read/write between processes.
For example in the LSP docs:
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_executeCommand
It says:
> The workspace/executeCommand request is sent from the client to the server to trigger command execution on the server. In most cases the server creates a WorkspaceEdit structure and applies the changes to the workspace using the request workspace/applyEdit which is sent from the server to the client."
So I need to send the message manually back to the client (the IDE) with the ID which JSON RPC requires also. I’m confused about the ID in particular and if it can be anything or it needs to be generated in the same stream as existing IDs.
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list