123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566open!Coreopen!Asyncopen!ImportmoduletypeAddress=Persistent_connection_kernel.AddressmoduletypeClosable=Persistent_connection_kernel.ClosablemoduletypeS=sigincludePersistent_connection_kernel.Svalcreate: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->connOr_error.tDeferred.t)->address:(moduleAddresswithtypet='address)->(unit->'addressOr_error.tDeferred.t)->tendmoduletypeS_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=ClosablemoduletypeS=SmoduletypeS_rpc=S_rpcmoduleMake(Conn:Closable):Swithtypeconn=Conn.tmoduleRpc:S_rpcwithtypeconn=Rpc.Connection.tmoduleVersioned_rpc:S_rpcwithtypeconn=Versioned_rpc.Connection_with_menu.tend