package async_js

  1. Overview
  2. Docs
type t = Async_rpc_kernel__Rpc.Connection.t
val sexp_of_t : t -> Sexplib0.Sexp.t
module Heartbeat_config : sig ... end
module Client_implementations : sig ... end
val create : ?implementations:'s Async_rpc_kernel__.Implementations.t -> connection_state:(t -> 's) -> ?handshake_timeout:Core.Time_ns.Span.t -> ?heartbeat_config:Heartbeat_config.t -> ?description:Core.Info.t -> ?time_source:Async_kernel.Synchronous_time_source.t -> Async_rpc_kernel__.Transport.t -> (t, Core.Exn.t) Core.Result.t Async_kernel.Deferred.t
val contains_magic_prefix : bool Core.Bin_prot.Type_class.reader
val description : t -> Core.Info.t
val add_heartbeat_callback : t -> (unit -> unit) -> unit
val reset_heartbeat_timeout : t -> Core.Time_ns.Span.t -> unit
val last_seen_alive : t -> Core.Time_ns.t
val close : ?streaming_responses_flush_timeout:Core.Time_ns.Span.t -> ?reason:Core.Info.t -> t -> unit Async_kernel.Deferred.t
val close_finished : t -> unit Async_kernel.Deferred.t
val close_reason : t -> on_close:[ `finished | `started ] -> Core.Info.t Async_kernel.Deferred.t
val is_closed : t -> bool
val bytes_to_write : t -> int
val flushed : t -> unit Async_kernel.Deferred.t
val with_close : ?implementations:'s Async_rpc_kernel__.Implementations.t -> ?handshake_timeout:Core.Time_ns.Span.t -> ?heartbeat_config:Heartbeat_config.t -> ?description:Core.Info.t -> ?time_source:Async_kernel.Synchronous_time_source.t -> connection_state:(t -> 's) -> Async_rpc_kernel__.Transport.t -> dispatch_queries:(t -> 'a Async_kernel.Deferred.t) -> on_handshake_error: [ `Call of Core.Exn.t -> 'a Async_kernel.Deferred.t | `Raise ] -> 'a Async_kernel.Deferred.t
val server_with_close : ?handshake_timeout:Core.Time_ns.Span.t -> ?heartbeat_config:Heartbeat_config.t -> ?description:Core.Info.t -> ?time_source:Async_kernel.Synchronous_time_source.t -> Async_rpc_kernel__.Transport.t -> implementations:'s Async_rpc_kernel__.Implementations.t -> connection_state:(t -> 's) -> on_handshake_error: [ `Call of Core.Exn.t -> unit Async_kernel.Deferred.t | `Ignore | `Raise ] -> unit Async_kernel.Deferred.t
type ('rest, 'implementations) client_t = ?uri:Uri.t -> ?heartbeat_config:Heartbeat_config.t -> ?description:Core.Info.t -> ?implementations:'implementations Client_implementations.t -> 'rest

This type of client connects to the websocket at the root of some host and port, i.e. ws://<address>/.

val client : (unit -> t Async_kernel.Deferred.Or_error.t, 's) client_t
val client_exn : (unit -> t Async_kernel.Deferred.t, 's) client_t
OCaml

Innovation. Community. Security.