12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758open!Coreopen!Asyncopen!ImportmoduletypeS=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:(Event.t->unitDeferred.t)->?retry_delay:(unit->Time.Span.t)->?random_state:Random.State.t->?time_source:Time_source.t->connect:(address->connOr_error.tDeferred.t)->(unit->addressOr_error.tDeferred.t)->tendmoduletypeT=Persistent_connection_kernel.TmoduletypePersistent_connection=sig(** A persistent connection is one that is automatically reestablished whenever lost. *)moduletypeS=SmoduletypeT=TmoduleMake(Conn:T):Swithtypeconn=Conn.tandtypeaddress=Conn.Address.tmoduleRpc:sigincludeSwithtypeconn=Rpc.Connection.tandtypeaddress=Host_and_port.t(** [create'] is like the [create], but slightly more convenient for constructing
unembellished rpc connections. *)valcreate':server_name:string->?log:Log.t->?on_event:(Event.t->unitDeferred.t)->?retry_delay:(unit->Time.Span.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.Span.t->?heartbeat_config:Rpc.Connection.Heartbeat_config.t->(unit->Host_and_port.tOr_error.tDeferred.t)->tendmoduleVersioned_rpc:Swithtypeconn=Versioned_rpc.Connection_with_menu.tandtypeaddress=Host_and_port.tend