mirror of
https://github.com/c-cube/linol.git
synced 2025-12-06 03:05:31 -05:00
Add a comment to send_server_req
Problem: There is an invariant that must be satisfied to call that function. Solution: Describe it to warn users of jsonrpc2.
This commit is contained in:
parent
431f3ea126
commit
8857d5e7c5
1 changed files with 4 additions and 0 deletions
|
|
@ -86,6 +86,10 @@ module Make (IO : IO) : S with module IO = IO = struct
|
|||
let json = Jsonrpc.Notification.yojson_of_t m in
|
||||
send_json_ self json
|
||||
|
||||
(** Send a server request to the LSP client. Invariant: you should call
|
||||
[register_server_request_response_handler] before calling this method to
|
||||
ensure that [handle_response] will have a registered handler for this
|
||||
response. *)
|
||||
let send_server_req (self : t) (m : Jsonrpc.Request.t) : unit IO.t =
|
||||
let json = Jsonrpc.Request.yojson_of_t m in
|
||||
send_json_ self json
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue