Module RPCClient.Typed

module Typed: sig .. end

type ('a, 'b) method_ 
A remote method, with parameter type 'a and return type 'b, so basically a RPC equivalent of 'a -> 'b.
val create : name:string ->
encode:('a -> Bencode.t) ->
decode:(Bencode.t -> 'b) -> ('a, 'b) method_
Create a representation of a remote method, where parameters are serialized with encode and result deserialized via decode. Any exception raised by encode or decode will be printed into a string and result in an Error.
val call : ?timeout:float ->
RPCClient.t ->
('a, 'b) method_ -> 'a -> 'b RPCClient.result Lwt.t
Call a remote method, encoding and decoding parameters and result.
val call_ignore : RPCClient.t -> ('a, 'b) method_ -> 'a -> unit
Call a remote method, ignoring the result