Re: [fpc-pascal] JSON RPC send server request to client

2022-10-04 Thread Michael Van Canneyt via fpc-pascal
On Tue, 4 Oct 2022, Wayne Sherman wrote: Michael wrote: Seems like both parts in the LSP protocol are playing 'client' and 'server', because: "The Client is defined as the origin of Request objects and the handler of Response objects. The Server is defined as the origin of Response obje

Re: [fpc-pascal] JSON RPC send server request to client

2022-10-04 Thread Wayne Sherman via fpc-pascal
Michael wrote: > Seems like both parts in the LSP protocol are playing 'client' and 'server', > because: > > "The Client is defined as the origin of Request objects and the handler of > Response objects. > The Server is defined as the origin of Response objects and the handler of > Request obj

Re: [fpc-pascal] JSON RPC send server request to client

2022-10-04 Thread Michael Van Canneyt via fpc-pascal
On Tue, 4 Oct 2022, Hairy Pixels wrote: On Oct 3, 2022, at 10:48 PM, Michael Van Canneyt via fpc-pascal wrote: FPC's JSON-RPC is designed to be used using HTTP(s) transport only, i.e. synchronous request and answer. Hence Ryan's failure to achieve what he wants to do. But if changes ne

Re: [fpc-pascal] JSON RPC send server request to client

2022-10-03 Thread Hairy Pixels via fpc-pascal
> On Oct 3, 2022, at 10:48 PM, Michael Van Canneyt via fpc-pascal > wrote: > > FPC's JSON-RPC is designed to be used using HTTP(s) transport only, i.e. > synchronous request and answer. > > Hence Ryan's failure to achieve what he wants to do. > > But if changes need to be made to make it usa

Re: [fpc-pascal] JSON RPC send server request to client

2022-10-03 Thread Michael Van Canneyt via fpc-pascal
On Sun, 2 Oct 2022, Wayne Sherman wrote: Wayne wrote: JSON-RPC can be used bi-directionally when using UNIX domain sockets, TCP sockets, and other bidirectional transports (e.g websockets). If implemented as such using a bi-direction transport, the endpoints can be both a server and a client

Re: [fpc-pascal] JSON RPC send server request to client

2022-10-02 Thread Wayne Sherman via fpc-pascal
Wayne wrote: > JSON-RPC can be used bi-directionally when using > UNIX domain sockets, TCP sockets, and other > bidirectional transports (e.g websockets). > If implemented as such using a bi-direction transport, > the endpoints can be both a server and a client > at the same time... Sorry, my use

Re: [fpc-pascal] JSON RPC send server request to client

2022-10-02 Thread Wayne Sherman via fpc-pascal
Michael 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. >From the spec, JSON-RPC 2.0 is "transport agnostic

Re: [fpc-pascal] JSON RPC send server request to client

2022-10-01 Thread Hairy Pixels via fpc-pascal
> On Oct 2, 2022, at 10:23 AM, Hairy Pixels 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 > exist

Re: [fpc-pascal] JSON RPC send server request to client

2022-10-01 Thread Hairy Pixels via fpc-pascal
> On Oct 2, 2022, at 9:16 AM, Michael Van Canneyt > 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

Re: [fpc-pascal] JSON RPC send server request to client

2022-10-01 Thread Michael Van Canneyt via fpc-pascal
On Sat, 1 Oct 2022, Hairy Pixels via fpc-pascal wrote: Quick question, I’ve been using the JSON RPC package to receive messages from the client and dispatch methods but I need to send a request from the server to the client now. Is this possible in the library? I can’t find a method in TCust

[fpc-pascal] JSON RPC send server request to client

2022-10-01 Thread Hairy Pixels via fpc-pascal
Quick question, I’ve been using the JSON RPC package to receive messages from the client and dispatch methods but I need to send a request from the server to the client now. Is this possible in the library? I can’t find a method in TCustomJSONRPCDispatcher which seems appropriate. Thanks! Regar