Support bi-directional JSON-RPC 2.0 #3

Open
opened 2020-10-13 22:12:54 +02:00 by p · 0 comments
Owner

This will allow us to properly toy around with LSP servers in the future, as well as with bi-directional WebSocket servers, however rare they are.

Not applicable to the HTTP(S) backend.

await_try_finish() needs to be rewritten to parse incoming messages and see if they are a valid response and that the "id" field, if any, corresponds to a pending request. If not, warn. If the message constitutes a request (which can be a notification), just display it with no means of responding to it.

process_response() needs to be refactored into a general parser/validator and a separate printer. Messages need processing before being elected as a matching response to a particular request.

This will allow us to properly toy around with LSP servers in the future, as well as with bi-directional WebSocket servers, however rare they are. Not applicable to the HTTP(S) backend. `await_try_finish()` needs to be rewritten to parse incoming messages and see if they are a valid response and that the "id" field, if any, corresponds to a pending request. If not, warn. If the message constitutes a request (which can be a notification), just display it with no means of responding to it. `process_response()` needs to be refactored into a general parser/validator and a separate printer. Messages need processing _before_ being elected as a matching response to a particular request.
p self-assigned this 2020-10-13 22:12:54 +02:00
p added a new dependency 2020-10-13 22:40:34 +02:00
p added this to the v1.2.0 milestone 2020-10-13 22:47:11 +02:00
p added a new dependency 2020-10-15 03:50:58 +02:00
p added this to the v1.2.0 project 2021-01-01 18:11:40 +01:00
Sign in to join this conversation.
No Label
WIP
easy
priority
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: p/json-rpc-shell#3
No description provided.