12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273open!Coreopen!Asyncopen!ImportmoduletypeAddress=Persistent_connection_kernel.AddressmoduletypeConnection_error=Persistent_connection_kernel.Connection_errormoduletypeClosable=Persistent_connection_kernel.ClosablemoduletypeS'=sigincludePersistent_connection_kernel.S'valcreate:server_name:string->?log:Log.t(** If [~log] is supplied then all events that would be passed to [on_event] will be
written there as well, with a "persistent-connection-to" tag value of
[server_name], which should be the name of the server we are connecting to. *)->?on_event:('addressEvent.t->unitDeferred.t)->?retry_delay:(unit->Time_float.Span.t)->?random_state:[`Non_random|`StateofRandom.State.t](** If a [~random_state] is supplied, randomization is applied to the result of
[retry_delay] after each call; if not, no randomization will be applied. The
default is [`State Random.State.default]. *)->?time_source:Time_source.t->connect:('address->(conn,conn_error)Result.tDeferred.t)->address:(moduleAddresswithtypet='address)->(unit->('address,conn_error)Result.tDeferred.t)->tendmoduletypeS=S'withtypeconn_error:=Error.tmoduletypeS_rpc=sigincludeS(** Like [create] but for Rpc-like connections (i.e. Async.Rpc and Async.Versioned_rpc)
where there is an obvious default for [connect] -- with a handful of extra optional
parameters to pass to the [Rpc.Connection] functions. *)valcreate':server_name:string->?log:Log.t->?on_event:(Host_and_port.tEvent.t->unitDeferred.t)->?retry_delay:(unit->Time_float.Span.t)->?random_state:[`Non_random|`StateofRandom.State.t]->?time_source:Time_source.t->?bind_to_address:Unix.Inet_addr.t->?implementations:Rpc.Connection.Client_implementations.t->?max_message_size:int->?make_transport:Rpc.Connection.transport_maker->?handshake_timeout:Time_float.Span.t->?heartbeat_config:Rpc.Connection.Heartbeat_config.t->(unit->Host_and_port.tOr_error.tDeferred.t)->tendmoduletypePersistent_connection=sig(** A persistent connection is one that is automatically reestablished whenever lost. *)moduletypeAddress=AddressmoduletypeClosable=ClosablemoduletypeConnection_error=Connection_errormoduletypeS=SmoduletypeS'=S'moduletypeS_rpc=S_rpcmoduleMake(Conn:Closable):Swithtypeconn=Conn.tmoduleMake'(Conn_err:Connection_error)(Conn:Closable):S'withtypeconn=Conn.tandtypeconn_error=Conn_err.tmoduleRpc:S_rpcwithtypeconn=Rpc.Connection.tmoduleVersioned_rpc:S_rpcwithtypeconn=Versioned_rpc.Connection_with_menu.tend