Support bi-directional JSON-RPC 2.0 #3

Open
opened 2 years ago by p · 0 comments
p commented 2 years ago
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 2 years ago
p added a new dependency 2 years ago
p added this to the v1.2.0 milestone 2 years ago
p added a new dependency 2 years ago
p added this to the v1.2.0 project 2 years ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Loading…
There is no content yet.