Ocamlnet 4 Reference Manual : Rpc_client

`sig
exception Message_lost
exception Message_timeout
exception Response_dropped
exception Communication_error of exn
exception Client_is_down
exception Keep_call
exception Unbound_exception of exn
type t
type connector =
Inet of (string * int)
| Internet of (Unix.inet_addr * int)
| Unix of string
| W32_pipe of string
| Descriptor of Unix.file_descr
| Dynamic_descriptor of (unit -> Unix.file_descr)
| Portmapped of string
val connector_of_sockaddr : Unix.sockaddr -> Rpc_client.connector
val connector_of_socksymbol :
Netsockaddr.socksymbol -> Rpc_client.connector
val shutdown_connector :
Rpc_client.t ->
Rpc_transport.rpc_multiplex_controller -> (unit -> unit) -> unit
class type socket_config =
object
method multiplexing :
dbg_name:string Pervasives.ref ->
close_inactive_descr:bool ->
peer_name:string option ->
Rpc.protocol ->
Unix.file_descr ->
Unixqueue.event_system ->
Rpc_transport.rpc_multiplex_controller Uq_engines.engine
method non_blocking_connect : bool
end
val default_socket_config : Rpc_client.socket_config
class default_socket_config : socket_config
val blocking_socket_config : Rpc_client.socket_config
class blocking_socket_config : socket_config
val tls_socket_config :
(module Netsys_crypto_types.TLS_CONFIG) -> Rpc_client.socket_config
class tls_socket_config :
(module Netsys_crypto_types.TLS_CONFIG) -> socket_config
type internal_pipe = Netxdr.xdr_value Netsys_polypipe.polypipe
type internal_socket = Netxdr.xdr_value Netsys_polysocket.polyclient
type mode2 =
[ `Internal_endpoint of
Rpc_client.internal_pipe * Rpc_client.internal_pipe
| `Internal_socket of Rpc_client.internal_socket
| `Multiplexer_endpoint of Rpc_transport.rpc_multiplex_controller
| `Socket of
Rpc.protocol * Rpc_client.connector * Rpc_client.socket_config
| `Socket_endpoint of Rpc.protocol * Unix.file_descr ]
val create2 :
?program_number:Netnumber.uint4 ->
?version_number:Netnumber.uint4 ->
?initial_xid:int ->
?shutdown:(Rpc_client.t ->
Rpc_transport.rpc_multiplex_controller ->
(unit -> unit) -> unit) ->
Rpc_client.mode2 ->
Rpc_program.t -> Unixqueue.event_system -> Rpc_client.t
val unbound_create :
?initial_xid:int ->
?shutdown:(Rpc_client.t ->
Rpc_transport.rpc_multiplex_controller ->
(unit -> unit) -> unit) ->
Rpc_client.mode2 -> Unixqueue.event_system -> Rpc_client.t
val bind : Rpc_client.t -> Rpc_program.t -> unit
val use : Rpc_client.t -> Rpc_program.t -> unit
val configure : Rpc_client.t -> int -> float -> unit
val configure_next_call : Rpc_client.t -> int -> float -> unit
val set_dgram_destination : Rpc_client.t -> Unix.sockaddr option -> unit
val set_batch_call : Rpc_client.t -> unit
val set_user_name : Rpc_client.t -> string option -> unit
val set_max_response_length : Rpc_client.t -> int -> unit
val set_exception_handler : Rpc_client.t -> (exn -> unit) -> unit
val set_mstring_factories :
Rpc_client.t -> Netxdr_mstring.named_mstring_factories -> unit
val event_system : Rpc_client.t -> Unixqueue.event_system
val programs : Rpc_client.t -> Rpc_program.t list
val get_socket_name : Rpc_client.t -> Unix.sockaddr
val get_peer_name : Rpc_client.t -> Unix.sockaddr
val get_sender_of_last_response : Rpc_client.t -> Unix.sockaddr
val get_xid_of_last_call : Rpc_client.t -> Netnumber.uint4
val get_protocol : Rpc_client.t -> Rpc.protocol
val get_tls_session_props :
Rpc_client.t -> Nettls_support.tls_session_props option
val get_gssapi_props : Rpc_client.t -> Netsys_gssapi.client_props option
val abandon_call : Rpc_client.t -> Netnumber.uint4 -> unit
val is_up : Rpc_client.t -> bool
val get_stats : Rpc_client.t -> int * int * int
val unbound_sync_call :
Rpc_client.t ->
Rpc_program.t -> string -> Netxdr.xdr_value -> Netxdr.xdr_value
val unbound_async_call :
Rpc_client.t ->
Rpc_program.t ->
string ->
Netxdr.xdr_value -> ((unit -> Netxdr.xdr_value) -> unit) -> unit
class unbound_async_call :
Rpc_client.t ->
Rpc_program.t ->
string -> Netxdr.xdr_value -> [Netxdr.xdr_value] Uq_engines.engine
val synchronize :
Unixqueue.event_system ->
('a -> ((unit -> 'b) -> unit) -> unit) -> 'a -> 'b
val shut_down : Rpc_client.t -> unit
val sync_shutdown : Rpc_client.t -> unit
val trigger_shutdown : Rpc_client.t -> (unit -> unit) -> unit
val set_debug_name : Rpc_client.t -> string -> unit
val get_debug_name : Rpc_client.t -> string
type reject_code = [ `Fail | `Next | `Renew | `Retry ]
class type auth_session =
object
method auth_protocol : Rpc_client.auth_protocol
method next_credentials :
Rpc_client.t ->
Rpc_program.t ->
string ->
Netnumber.uint4 ->
string * string * string * string * Netxdr.encoder option *
Netxdr.decoder option
method server_accepts :
Rpc_client.t -> Netnumber.uint4 -> string -> string -> unit
method server_rejects :
Rpc_client.t ->
Netnumber.uint4 -> Rpc.server_error -> Rpc_client.reject_code
end
and auth_protocol =
object
method auth_method : Rpc_client.auth_method
method destroy : unit -> unit
method emit :
Netnumber.uint4 ->
Netnumber.uint4 -> Netnumber.uint4 -> Rpc_packer.packed_value
method gssapi_props : Netsys_gssapi.client_props option
method receive : Rpc_packer.packed_value -> unit
method state :
[ `Done of Rpc_client.auth_session
| `Emit
| `Error
| `Receive of Netnumber.uint4 ]
end
and auth_method =
object
method name : string
method new_session :
Rpc_client.t -> string option -> Rpc_client.auth_protocol
end
val auth_none : Rpc_client.auth_method
val set_auth_methods : Rpc_client.t -> Rpc_client.auth_method list -> unit
module type USE_CLIENT =
sig
type t
val use : Rpc_client.USE_CLIENT.t -> Rpc_program.t -> unit
val unbound_sync_call :
Rpc_client.USE_CLIENT.t ->
Rpc_program.t -> string -> Netxdr.xdr_value -> Netxdr.xdr_value
val unbound_async_call :
Rpc_client.USE_CLIENT.t ->
Rpc_program.t ->
string ->
Netxdr.xdr_value -> ((unit -> Netxdr.xdr_value) -> unit) -> unit
val xdr_ctx : Rpc_client.USE_CLIENT.t -> Netxdr.ctx
end
val xdr_ctx : Rpc_client.t -> Netxdr.ctx
val create :
?program_number:Netnumber.uint4 ->
?version_number:Netnumber.uint4 ->
?initial_xid:int ->
?shutdown:(Rpc_client.t ->
Rpc_transport.rpc_multiplex_controller ->
(unit -> unit) -> unit) ->
Unixqueue.event_system ->
Rpc_client.connector -> Rpc.protocol -> Rpc_program.t -> Rpc_client.t
val program : Rpc_client.t -> Rpc_program.t
val add_call :
Rpc_client.t ->
string ->
Netxdr.xdr_value -> ((unit -> Netxdr.xdr_value) -> unit) -> unit
val sync_call :
Rpc_client.t -> string -> Netxdr.xdr_value -> Netxdr.xdr_value
val verbose : bool -> unit
module Debug :
sig
val enable : bool Pervasives.ref
val enable_ptrace : bool Pervasives.ref
val ptrace_verbosity : Rpc_util.verbosity Pervasives.ref
val disable_for_client : Rpc_client.t -> unit
end
end`