sig
  type protocol_violation =
      [ `BadMessageType
      | `CompressionNotSupported
      | `MessageFormatViolation of string ]
  exception Protocol_violation of Hydro_types.protocol_violation
  exception Marshal_error of string
  exception Unmarshal_error of string
  type limitation =
      [ `UnsupportedEncodingVersion
      | `UnsupportedEndpointType of int
      | `UnsupportedProtocolVersion ]
  exception Limitation of Hydro_types.limitation
  type proxy_error =
      [ `NoCallableEndpointFound
      | `NoEndpointIsReachable
      | `NoLocatorIsReachable
      | `ProxyIsDown ]
  exception Proxy_error of Hydro_types.proxy_error
  exception Domain_not_found of string
  exception Unbound_exception of exn
  exception Unimplemented_operation of string
  type noreturn
  type value =
      [ `Bool of bool
      | `Byte of int
      | `Byteseq of string
      | `Class of Hydro_types.class_repr Pervasives.ref
      | `Dictionary of (Hydro_types.value * Hydro_types.value) array
      | `DirectWriter of Netbuffer.t -> unit
      | `Double of float
      | `Enum of int
      | `Float of float
      | `Int of int
      | `Int32 of int32
      | `Long of int64
      | `Nothing
      | `Null
      | `Proxy of Hydro_types.proxy_addr
      | `Sequence of Hydro_types.value array
      | `Short of int
      | `String of string
      | `Struct of Hydro_types.value array ]
  and class_repr =
      [ `Placeholder of int32 | `Value of Hydro_types.object_value ]
  and sliced_value =
      < hydro_effective_id : string; hydro_slices : Hydro_types.slice list >
  and object_value =
      < hydro_effective_id : string;
        hydro_inflate : string -> Hydro_types.noreturn;
        hydro_invoke_operation : string ->
                                 Hydro_types.value array ->
                                 Hydro_types.session -> unit;
        hydro_slices : Hydro_types.slice list >
  and slice =
      [ `Decoded of string * Hydro_types.value array
      | `Opaque of string * string ]
  and proxy_addr =
      < facet : string option; id : Hydro_types.identity;
        mode : Hydro_types.proxy_mode;
        parameters : Hydro_types.proxy_parameters; secure : bool >
  and proxy_mode =
      [ `Batch_datagram | `Batch_oneway | `Datagram | `Oneway | `Twoway ]
  and proxy_parameters =
      [ `Endpoints of Hydro_types.endpoint array | `Indirect of string ]
  and endpoint =
      [ `SSL of Hydro_types.ssl_endpoint
      | `TCP of Hydro_types.tcp_endpoint
      | `UDP of Hydro_types.udp_endpoint
      | `Unknown of int * string ]
  and endpoint_type = [ `SSL | `TCP | `UDP | `Unknown of int ]
  and tcp_endpoint =
      < compress : bool; host : string; port : int; timeout : int32 >
  and udp_endpoint =
      < compress : bool; enc_major : int; enc_minor : int; host : string;
        port : int; proto_major : int; proto_minor : int >
  and ssl_endpoint = Hydro_types.tcp_endpoint
  and identity = < category : string; name : string >
  and htype =
      [ `Bool
      | `Byte
      | `Byteseq
      | `Class of string
      | `Dictionary of Hydro_types.htype * Hydro_types.htype
      | `Double
      | `Enum of string array
      | `Float
      | `Int
      | `Int32
      | `Long
      | `Proxy of string
      | `Sequence of Hydro_types.htype
      | `Short
      | `String
      | `Struct of (string * Hydro_types.htype) array
      | `Void ]
  and hexn =
      < elements : (string * Hydro_types.htype) array; name : string;
        super : Hydro_types.hexn option >
  and hintf =
      < elements : Hydro_types.hfunction list; name : string;
        super : Hydro_types.hintf list >
  and hfunction =
      < in_args : (string * Hydro_types.htype) array; in_classes : bool;
        mode : Hydro_types.op_mode; name : string;
        out_args : (string * Hydro_types.htype) array; out_classes : 
        bool; result : Hydro_types.htype >
  and hclass =
      < elements : (string * Hydro_types.htype) array; name : string;
        super : Hydro_types.hclass option >
  and system =
      < classes : Hydro_types.hclass Hydro_prelim.CiHashtbl.t;
        ctors : (Hydro_types.sliced_value -> Hydro_types.object_value)
                Hydro_prelim.CiHashtbl.t;
        exceptions : Hydro_types.hexn Hydro_prelim.CiHashtbl.t;
        interfaces : Hydro_types.hintf Hydro_prelim.CiHashtbl.t;
        types : Hydro_types.htype Hydro_prelim.CiHashtbl.t >
  and op_mode = [ `Idempotent | `Nonmutating | `Normal ]
  and msg_type =
      [ `Batch_request
      | `Close_connection
      | `Reply
      | `Request
      | `Validate_connection ]
  and compression_status =
      [ `Compressed | `Compression_unsupported | `Uncompressed ]
  and msg_header =
      < body_size : int; compression : Hydro_types.compression_status;
        enc_major : int; enc_minor : int; msg_type : Hydro_types.msg_type;
        proto_major : int; proto_minor : int >
  and encap_buffer = {
    encap_buf : Netbuffer.t;
    encap_pos : int;
    encap_len : int;
    encap_enc_minor : int;
  }
  and msg_buffer = Hydro_types.msg_header * Hydro_types.encap_buffer list
  and msg =
      [ `Batch_request of Hydro_types.batch_request_msg list
      | `Close_connection
      | `Reply of Hydro_types.reply_msg
      | `Request of Hydro_types.request_msg
      | `Validate_connection ]
  and request_msg =
      < context : (string * string) array; facet : string option;
        id : Hydro_types.identity; mode : Hydro_types.op_mode;
        operation : string; params : Hydro_types.encap_buffer;
        request_id : int32 >
  and batch_request_msg =
      < context : (string * string) array; facet : string option;
        id : Hydro_types.identity; mode : Hydro_types.op_mode;
        operation : string; params : Hydro_types.encap_buffer >
  and reply_msg = < request_id : int32; result : Hydro_types.result >
  and result =
      [ `Facet_does_not_exist of
          Hydro_types.identity * string option * string
      | `Object_does_not_exist of
          Hydro_types.identity * string option * string
      | `Operation_does_not_exist of
          Hydro_types.identity * string option * string
      | `Success of Hydro_types.encap_buffer
      | `Unknown_exception of string
      | `Unknown_local_exception of string
      | `Unknown_user_exception of string
      | `User_exception of Hydro_types.encap_buffer ]
  and call_params =
      < context : (string * string) list option;
        destination : Unix.sockaddr option; msg_timeout : float option >
  and exn_handler = < handle : exn -> unit >
  and client_params =
      < exception_handler : Hydro_types.exn_handler; idle_timeout : float;
        max_enc_minor : int option; max_proto_minor : int option;
        msg_timeout : float; trans_timeout : float >
  and server_params = < trans_timeout : float >
  and server_ops =
      < abort_connection : unit -> unit; endpoint : Hydro_types.endpoint;
        event_system : Unixqueue.event_system; server_id : int;
        server_params : Hydro_types.server_params;
        shutdown_connection : unit -> unit; system : Hydro_types.system >
  and session =
      < context : (string * string) list;
        emit_result : Hydro_types.value -> Hydro_types.value array -> unit;
        emit_unknown_exception : string -> unit;
        emit_unknown_local_exception : string -> unit;
        emit_unknown_user_exception : string -> unit;
        emit_user_exception : Hydro_types.sliced_value -> unit;
        is_responded : bool; request_id : int32;
        response : Hydro_types.reply_msg option;
        server_ops : Hydro_types.server_ops >
  and operation_dispatcher =
      < hydro_effective_id : string;
        hydro_invoke_operation : string ->
                                 Hydro_types.value array ->
                                 Hydro_types.session -> unit >
  and facet_dispatcher =
      < invoke_facet : string option -> Hydro_types.operation_dispatcher >
  and object_dispatcher =
      < get_identity : Hydro_types.operation_dispatcher ->
                       Hydro_types.identity;
        invoke_object : Hydro_types.identity -> Hydro_types.facet_dispatcher >
  and client_condition =
      [ `Client_is_down
      | `Connect_error of exn
      | `Connect_timeout
      | `Error of exn
      | `Facet_does_not_exist of
          Hydro_types.identity * string option * string
      | `Message_lost of bool
      | `Message_timeout
      | `Object_does_not_exist of
          Hydro_types.identity * string option * string
      | `Operation_does_not_exist of
          Hydro_types.identity * string option * string
      | `Transport_timeout
      | `Unknown_exception of string
      | `Unknown_local_exception of string
      | `Unknown_user_exception of string
      | `User_exception of Hydro_types.sliced_value ]
  exception Client_condition of Hydro_types.client_condition
  type transport_protocol_type = [ `Datagram | `Stream ]
  class type descriptor =
    object
      method file_descr : Unix.file_descr
      method is_master : bool
      method proto_type : Hydro_types.transport_protocol_type
      method shutdown : unit -> unit
    end
  type network_port =
      [ `TCP of Unix.inet_addr * int | `UDP of Unix.inet_addr * int ]
end