sig
exception Connection_lost
type t
type session
type connection_id
type connector =
Localhost of int
| Portmapped
| Internet of (Unix.inet_addr * int)
| Unix of string
| Descriptor of Unix.file_descr
| Dynamic_descriptor of (unit -> Unix.file_descr)
type binding_sync = {
sync_name : string;
sync_proc : Xdr.xdr_value -> Xdr.xdr_value;
}
type binding_async = {
async_name : string;
async_invoke : Rpc_server.session -> Xdr.xdr_value -> unit;
}
type binding =
Sync of Rpc_server.binding_sync
| Async of Rpc_server.binding_async
val create :
?program_number:Rtypes.uint4 ->
?version_number:Rtypes.uint4 ->
Unixqueue.event_system ->
Rpc_server.connector ->
Rpc.protocol ->
Rpc.mode ->
Rpc_program.t -> Rpc_server.binding list -> int -> Rpc_server.t
class type socket_config =
object
method listen_options : Uq_engines.listen_options
method multiplexing :
close_inactive_descr:bool ->
Rpc.protocol ->
Unix.file_descr ->
Unixqueue.event_system ->
Rpc_transport.rpc_multiplex_controller Uq_engines.engine
end
val default_socket_config : Rpc_server.socket_config
class default_socket_config : socket_config
type mode2 =
[ `Multiplexer_endpoint of Rpc_transport.rpc_multiplex_controller
| `Socket of
Rpc.protocol * Rpc_server.connector * Rpc_server.socket_config
| `Socket_endpoint of Rpc.protocol * Unix.file_descr ]
val create2 : Rpc_server.mode2 -> Unixqueue.event_system -> Rpc_server.t
val bind :
?program_number:Rtypes.uint4 ->
?version_number:Rtypes.uint4 ->
Rpc_program.t -> Rpc_server.binding list -> Rpc_server.t -> unit
val unbind :
?program_number:Rtypes.uint4 ->
?version_number:Rtypes.uint4 -> Rpc_program.t -> Rpc_server.t -> unit
val bound_programs : Rpc_server.t -> Rpc_program.t list
val get_event_system : Rpc_server.session -> Unixqueue.event_system
val get_connection_id : Rpc_server.session -> Rpc_server.connection_id
val get_xid : Rpc_server.session -> Rtypes.uint4
val get_socket_name : Rpc_server.session -> Unix.sockaddr
val get_peer_name : Rpc_server.session -> Unix.sockaddr
val get_conn_socket_name : Rpc_server.connection_id -> Unix.sockaddr
val get_conn_peer_name : Rpc_server.connection_id -> Unix.sockaddr
val get_server : Rpc_server.session -> Rpc_server.t
val get_main_socket_name : Rpc_server.t -> Unix.sockaddr
val get_protocol : Rpc_server.t -> Rpc.protocol
val get_srv_event_system : Rpc_server.t -> Unixqueue.unix_event_system
type rule =
[ `Accept
| `Accept_limit_length of int * Rpc_server.rule
| `Deny
| `Drop
| `Reject ]
val set_session_filter :
Rpc_server.t -> (Unix.sockaddr -> Rpc_server.rule) -> unit
val set_session_filter_2 :
Rpc_server.t ->
(Unix.sockaddr -> Rpc_server.connection_id -> Rpc_server.rule) -> unit
val reply : Rpc_server.session -> Xdr.xdr_value -> unit
val reply_error : Rpc_server.session -> Rpc.server_error -> unit
val set_exception_handler : Rpc_server.t -> (exn -> unit) -> unit
val set_onclose_action :
Rpc_server.t -> (Rpc_server.connection_id -> unit) -> unit
val set_timeout : Rpc_server.t -> float -> unit
val stop_server : ?graceful:bool -> Rpc_server.t -> unit
val stop_connection : Rpc_server.t -> Rpc_server.connection_id -> unit
type auth_result =
Auth_positive of (string * string * string)
| Auth_negative of Rpc.server_error
type auth_peeker =
[ `None
| `Peek_descriptor of Unix.file_descr -> string option
| `Peek_multiplexer of
Rpc_transport.rpc_multiplex_controller -> string option ]
class type auth_method =
object
method authenticate :
Rpc_server.t ->
Rpc_server.connection_id ->
Unix.sockaddr option ->
Unix.sockaddr option ->
string ->
string ->
string -> string -> (Rpc_server.auth_result -> unit) -> unit
method flavors : string list
method name : string
method peek : Rpc_server.auth_peeker
end
val set_auth_methods : Rpc_server.t -> Rpc_server.auth_method list -> unit
val auth_none : Rpc_server.auth_method
val auth_too_weak : Rpc_server.auth_method
val auth_transport : Rpc_server.auth_method
val get_user : Rpc_server.session -> string
val get_auth_method : Rpc_server.session -> Rpc_server.auth_method
val verbose : bool -> unit
val debug_internals_log : (string -> unit) option Pervasives.ref
val debug_service_log : (string -> unit) option Pervasives.ref
end