package dap

  1. Overview
  2. Docs
Debug adapter protocol

Install

Dune Dependency

Authors

Maintainers

Sources

dap-1.0.1.tbz
sha256=2c1cb97ed697a3b3c236b3d6d42332193ed9e4f169845551d3690bfa8aa1f527
sha512=9653b7e91148b0a86c41084524dc52ac25e2062d0c39965ab6a916791e9149ca0459ad1e12a71f0670e1956e5295c08356c3bb26bf99090739763f3dbe1fcbdb

doc/dap.rpc_lwt/Debug_rpc/index.html

Module Debug_rpcSource

Sourcetype t

The type of rpc connection

Sourceval create : in_:Lwt_io.input_channel -> out:Lwt_io.output_channel -> ?next_seq:int -> unit -> t

create ~in_ ~out ?next_seq () Create a rpc connection

Sourceval event : t -> (module Debug_protocol.EVENT with type Payload.t = 'a) -> 'a React.E.t

event rpc (module The_event) Get a The_event.Payload.t React.E.t for opposite end sent events

Sourceval send_event : t -> (module Debug_protocol.EVENT with type Payload.t = 'a) -> 'a -> unit Lwt.t

send_event rpc (module The_event) payload Send event with payload to the opposite end

Sourceval set_command_handler : t -> (module Debug_protocol.COMMAND with type Arguments.t = 'a and type Result.t = 'b) -> ('a -> 'b Lwt.t) -> unit

set_command_handler rpc (module The_command) f Set handler f for The_command

Sourceval remove_command_handler : t -> (module Debug_protocol.COMMAND) -> unit

remove_command_handler rpc (module The_command) Remove handler for The_command

Sourceval exec_command : t -> (module Debug_protocol.COMMAND with type Arguments.t = 'a and type Result.t = 'b) -> 'a -> 'b Lwt.t

exec_command rpc (module The_command) arg Execute The_command with arg on the opposite end.

  • returns

    res Returns promise of The_command.Result.t. You can use Lwt.cancel on it to cancel the request.

Sourceval start : t -> unit Lwt.t

start rpc Start rpc dispatch loop. You must call it before interact with rpc. This method will block until input_channel closed. You may call it in a Lwt.async block

OCaml

Innovation. Community. Security.