> On Oct 2, 2022, at 10:23 AM, Hairy Pixels <generic...@gmail.com> wrote:
> 
> 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.

Follow up, I sent the message by manually packaging it with the RPC protocol 
and made my own ID, which works but there is no way to get a response from the 
client in your library it appears (like you said this may just not be supported)

In LSP the client is sending back this response payload which has the ID of the 
request. I guess to implement this you would need to keep a list of sent 
requests by ID and then find their handler (like the method dispatcher for 
requests) and invoke with the “results” data.

interface ResponseMessage extends Message {
        id: integer | string | null;
        result?: string | number | boolean | object | null;
        error?: ResponseError;
}

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to