package async_rpc_kernel

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Rpc.One_waySource

An RPC that has no response. Error handling is trickier here than it is for RPCs with responses, as there is no reasonable place to put an error if something goes wrong. Because of this, in the event of an error such as dispatching to an unimplemented RPC, the connection will be shut down. Similarly, if the implementation raises an exception, the connection will be shut down.

Sourcetype 'msg t
Sourceval create : name:string -> version:int -> bin_msg:'msg Core.Bin_prot.Type_class.t -> 'msg t
Sourceval name : _ t -> string
Sourceval version : _ t -> int
Sourceval description : _ t -> Description.t
Sourceval msg_type_id : 'msg t -> 'msg Core.Type_equal.Id.t
Sourceval bin_msg : 'msg t -> 'msg Core.Bin_prot.Type_class.t
Sourceval implement : ?on_exception:On_exception.t -> 'msg t -> ('connection_state -> 'msg -> unit) -> 'connection_state Implementation.t
Sourceval dispatch' : 'msg t -> Connection.t -> 'msg -> unit Rpc_result.t

dispatch' exposes Rpc_result.t as output. Passing it through rpc_result_to_or_error gives you the same result as dispatch

Sourceval rpc_result_to_or_error : 'msg t -> Connection.t -> unit Rpc_result.t -> unit Core.Or_error.t
Sourceval dispatch : 'msg t -> Connection.t -> 'msg -> unit Core.Or_error.t
Sourceval dispatch_exn : 'msg t -> Connection.t -> 'msg -> unit
Sourcemodule Expert : sig ... end