Commits

Anonymous committed 3039689

Checkpoint. Update for Iom_gadget instead of Iom_reactor.

Comments (0)

Files changed (30)

beep/beep_channel.ml

   OF THE POSSIBILITY OF SUCH DAMAGE. 
  *---------------------------------------------------------------------------*)
 
-open Iom_reactor
+open Iom_gadget
 open Cf_cmonad.Op
 
 module M_profile = struct

beep/beep_channel.mli

 module M_close: M_signal
 module M_error: M_signal
 
-open Iom_reactor
+open Iom_gadget
 
 type control_rx_t =
     | C_rx_exchange of Beep_exchange.t

beep/beep_entity_exchange.ml

 (**)
 
 open Cf_cmonad.Op
-open Iom_reactor
+open Iom_gadget
 
 module Err = Beep_error
 module F = Beep_frame

beep/beep_entity_exchange.mli

   OF THE POSSIBILITY OF SUCH DAMAGE. 
  *---------------------------------------------------------------------------*)
 
-open Iom_reactor
+open Iom_gadget
 
 type entity_t = Beep_exchange.header_t * Cf_message.t
 type cancel_t = Cancel

beep/beep_exchange.ml

 open Cf_cmonad.Op
 
 type 'a answer_t =
-    | Ans_entity of 'a Iom_reactor.rx
-    | Ans_final of (unit, unit) Iom_reactor.t
+    | Ans_entity of 'a Iom_gadget.rx
+    | Ans_final of (unit, unit) Iom_gadget.t
 
-type 'a msg_t = [ `MSG of 'a Iom_reactor.rx ]
-type 'a rpy_t = [ `RPY of 'a Iom_reactor.rx ]
-type 'a err_t = [ `ERR of 'a Iom_reactor.rx ]
-type 'a ans_t = [ `ANS of 'a answer_t Iom_reactor.rx ]
+type 'a msg_t = [ `MSG of 'a Iom_gadget.rx ]
+type 'a rpy_t = [ `RPY of 'a Iom_gadget.rx ]
+type 'a err_t = [ `ERR of 'a Iom_gadget.rx ]
+type 'a ans_t = [ `ANS of 'a answer_t Iom_gadget.rx ]
 type 'a response_t = [ 'a rpy_t | 'a err_t | 'a ans_t | `NUL ]
 
 type t = {
     request: Beep_frame.phandle_t msg_t;
-    response: Beep_frame.phandle_t response_t Iom_reactor.tx;
+    response: Beep_frame.phandle_t response_t Iom_gadget.tx;
 }
 
-class type client = object method link: 's. ('s, t) Iom_reactor.t end
-class type service = object method link: 's. t -> ('s, unit) Iom_reactor.t end
+class type client = object method link: 's. ('s, t) Iom_gadget.t end
+class type service = object method link: 's. t -> ('s, unit) Iom_gadget.t end
 
 (*--- End of File [ beep_exchange.ml ] ---*)

beep/beep_exchange.mli

 val is_xml_header: header_t -> bool
 
 type 'a answer_t =
-    | Ans_entity of 'a Iom_reactor.rx
-    | Ans_final of (unit, unit) Iom_reactor.t
+    | Ans_entity of 'a Iom_gadget.rx
+    | Ans_final of (unit, unit) Iom_gadget.t
 
-type 'a msg_t = [ `MSG of 'a Iom_reactor.rx ]
-type 'a rpy_t = [ `RPY of 'a Iom_reactor.rx ]
-type 'a err_t = [ `ERR of 'a Iom_reactor.rx ]
-type 'a ans_t = [ `ANS of 'a answer_t Iom_reactor.rx ]
+type 'a msg_t = [ `MSG of 'a Iom_gadget.rx ]
+type 'a rpy_t = [ `RPY of 'a Iom_gadget.rx ]
+type 'a err_t = [ `ERR of 'a Iom_gadget.rx ]
+type 'a ans_t = [ `ANS of 'a answer_t Iom_gadget.rx ]
 type 'a response_t = [ 'a rpy_t | 'a err_t | 'a ans_t | `NUL ]
 
 type t = {
     request: Beep_frame.phandle_t msg_t;
-    response: Beep_frame.phandle_t response_t Iom_reactor.tx
+    response: Beep_frame.phandle_t response_t Iom_gadget.tx
 }
 
-class type client = object method link: 's. ('s, t) Iom_reactor.t end
-class type service = object method link: 's. t -> ('s, unit) Iom_reactor.t end
+class type client = object method link: 's. ('s, t) Iom_gadget.t end
+class type service = object method link: 's. t -> ('s, unit) Iom_gadget.t end
 
 (*--- End of File [ beep_exchange.mli ] ---*)

beep/beep_frame.ml

 
 type t = [ msg_t | rpy_t | err_t | ans_t | nul_t ]
 
-type 'a handle_t = { h_data: 'a; h_ack: (unit, unit) Iom_reactor.t option }
+type 'a handle_t = { h_data: 'a; h_ack: (unit, unit) Iom_gadget.t option }
 type phandle_t = payload_t handle_t
 type fhandle_t = t handle_t
 

beep/beep_frame.mli

 
 type t = [ msg_t | rpy_t | err_t | ans_t | nul_t ]
 
-type 'a handle_t = { h_data: 'a; h_ack: (unit, unit) Iom_reactor.t option }
+type 'a handle_t = { h_data: 'a; h_ack: (unit, unit) Iom_gadget.t option }
 type phandle_t = payload_t handle_t
 type fhandle_t = t handle_t
 
     int -> [< t ] -> (([> msg_t | rpy_t | err_t | ans_t ] as 'a) * 'a) option
 
 val join_ack:
-    (unit, unit) Iom_reactor.t option -> (unit, unit) Iom_reactor.t option ->
-    (unit, unit) Iom_reactor.t option
+    (unit, unit) Iom_gadget.t option -> (unit, unit) Iom_gadget.t option ->
+    (unit, unit) Iom_gadget.t option
 
 val join_handle:
     ('a -> 'a -> 'a option) -> 'a handle_t -> 'a handle_t ->

beep/beep_frame_exchange.ml

 (**)
 
 open Cf_cmonad.Op
-open Iom_reactor
+open Iom_gadget
 
 type header_processing_t = [ `H_parse | `H_strip | `H_leave ]
 

beep/beep_frame_exchange.mli

   OF THE POSSIBILITY OF SUCH DAMAGE. 
  *---------------------------------------------------------------------------*)
 
-open Iom_reactor
+open Iom_gadget
 
 type header_processing_t = [ `H_parse | `H_strip | `H_leave ]
 

beep/beep_parsed_exchange.ml

 end
 
 module type T = sig
-    open Iom_reactor
+    open Iom_gadget
 
     module P: Profile_T
     
 
 module Create(P: Profile_T) = struct
     open Cf_cmonad.Op
-    open Iom_reactor
+    open Iom_gadget
 
     module P = P
             

beep/beep_parsed_exchange.mli

 end
 
 module type T = sig
-    open Iom_reactor
+    open Iom_gadget
 
     module P: Profile_T
     

beep/beep_sasl.ml

 module Exchange = E_xml.Create(P)
 module SaslM = Sasl_mechanism
 
-open Iom_reactor
+open Iom_gadget
 open Cf_cmonad.Op
 
 type 'id control_rx_t =

beep/beep_sasl.mli

     and module P.ERR = Beep_transport.M_error
     and module P.ANS = Beep_xml_exchange.Null_entity
 
-open Iom_reactor
+open Iom_gadget
 
 type 'id control_rx_t =
     | C_rx_success of 'id * Sasl_security.codec_t option

beep/beep_tcp_mapping.ml

 module U = Beep_transport
 module IO = Iom_sock_stream
 
-open Iom_reactor
+open Iom_gadget
 open Cf_cmonad.Op
 
 class config =
 
     (*--- Create idle reactor ---*)
     duplex >>= fun ((idleRx, idleTx), (idleRx', idleTx')) ->
-    let idleRx = (idleRx :> e_idle_t rx) in
+    let idleRx = (idleRx :> Iom_reactor.e_idle_t rx) in
     let idleTx = (idleTx :> control_t tx) in
-    idle ~c:idleRx' ~r:idleTx' k >>= fun () ->
+    Iom_reactor.idle ~c:idleRx' ~r:idleTx' k >>= fun () ->
     
     (*--- Main loop ---*)
     let rec loop () =

beep/beep_tcp_mapping.mli

   OF THE POSSIBILITY OF SUCH DAMAGE. 
  *---------------------------------------------------------------------------*)
 
-open Iom_reactor
+open Iom_gadget
 
 class config:
     object

beep/beep_transport.ml

 module X = X_create(struct let tag = "Beep_transport" end)
 *)
 
-open Iom_reactor
+open Iom_gadget
 open Cf_cmonad.Op
 
 module Err = Beep_error
     open Cf_parser.Op
     
     type t =
-        | Profile of E_profile.t * (unit, unit) Iom_reactor.t option
-        | Ok of (unit, unit) Iom_reactor.t option
+        | Profile of E_profile.t * (unit, unit) Iom_gadget.t option
+        | Ok of (unit, unit) Iom_gadget.t option
     
     let parse h = assert false  (* never called *)
     

beep/beep_transport.mli

   OF THE POSSIBILITY OF SUCH DAMAGE. 
  *---------------------------------------------------------------------------*)
 
-open Iom_reactor
+open Iom_gadget
 
 class config:
     object

beep/beep_xml_exchange.ml

 end
 
 module type T = sig
-    open Iom_reactor
+    open Iom_gadget
 
     module P: Profile_T
 
 
 module Create(P: Profile_T) = struct
     open Cf_cmonad.Op
-    open Iom_reactor
+    open Iom_gadget
 
     module P = P
 

beep/beep_xml_exchange.mli

 end
 
 module type T = sig
-    open Iom_reactor
+    open Iom_gadget
 
     module P: Profile_T
 
 end
 
 module Foo_loopback = struct
-    open Iom_reactor
+    open Iom_gadget
     open Cf_cmonad.Op
 
     module E = Beep_exchange
             
             method private virtual client_:
                 's 'a 'x.
-                (([> `Final | `Error of exn ] as 'x) #Iom_reactor.tx as 'a) ->
-                UM.S.t -> Iom_reactor.kernel_t -> ('s, unit) Iom_reactor.t
+                (([> `Final | `Error of exn ] as 'x) #Iom_gadget.tx as 'a) ->
+                UM.S.t -> Iom_gadget.kernel_t -> ('s, unit) Iom_gadget.t
             
             method private virtual service_:
                 's 'a 'x.
-                (([> `Final | `Error of exn ] as 'x) #Iom_reactor.tx as 'a) ->
-                UM.S.t -> Iom_reactor.kernel_t -> ('s, unit) Iom_reactor.t
+                (([> `Final | `Error of exn ] as 'x) #Iom_gadget.tx as 'a) ->
+                UM.S.t -> Iom_gadget.kernel_t -> ('s, unit) Iom_gadget.t
 
             method private initiator_:
-                's 'a. (top_event_t #Iom_reactor.tx as 'a) ->
-                UM.S.address_t -> Iom_reactor.kernel_t ->
-                ('s, unit) Iom_reactor.t
+                's 'a. (top_event_t #Iom_gadget.tx as 'a) ->
+                UM.S.address_t -> Iom_gadget.kernel_t ->
+                ('s, unit) Iom_gadget.t
 
             method private listener_:
-                's 'a. (top_event_t #Iom_reactor.tx as 'a) ->
-                Iom_reactor.kernel_t -> ('s, unit) Iom_reactor.t
+                's 'a. (top_event_t #Iom_gadget.tx as 'a) ->
+                Iom_gadget.kernel_t -> ('s, unit) Iom_gadget.t
 
             method private reactor_:
-                's. Iom_reactor.kernel_t -> ('s, unit) Iom_reactor.t
+                's. Iom_gadget.kernel_t -> ('s, unit) Iom_gadget.t
 
             method test: unit -> unit
         end
 end
 
 module Loopback(P: Loopback_Profile_T): Loopback_T = struct
-    open Iom_reactor
+    open Iom_gadget
     open Cf_cmonad.Op
     
     module Socket = P.Socket
             
             method private virtual client_:
                 's 'a 'x.
-                (([> `Final | `Error of exn ] as 'x) #Iom_reactor.tx as 'a) ->
-                UM.S.t -> Iom_reactor.kernel_t -> ('s, unit) Iom_reactor.t
+                (([> `Final | `Error of exn ] as 'x) #Iom_gadget.tx as 'a) ->
+                UM.S.t -> Iom_gadget.kernel_t -> ('s, unit) Iom_gadget.t
             
             method private virtual service_:
                 's 'a 'x.
-                (([> `Final | `Error of exn ] as 'x) #Iom_reactor.tx as 'a) ->
-                UM.S.t -> Iom_reactor.kernel_t -> ('s, unit) Iom_reactor.t
+                (([> `Final | `Error of exn ] as 'x) #Iom_gadget.tx as 'a) ->
+                UM.S.t -> Iom_gadget.kernel_t -> ('s, unit) Iom_gadget.t
 
             method private initiator_:
                 's 'a. (top_event_t #tx as 'a) -> UM.S.address_t ->
 module TCP6_loopback = Loopback(TCP6_Loopback_Profile)
 
 module T2 = struct
-    open Iom_reactor
+    open Iom_gadget
     open Cf_cmonad.Op
     
     module L = TCP6_loopback
     
     val sasl_clients:
         ((id_t, query_t, credential_t) Sasl_supplicant.request_t
-            #Iom_reactor.tx -> id_t Sasl_mechanism.client) list
+            #Iom_gadget.tx -> id_t Sasl_mechanism.client) list
     
     val sasl_services:
         ((id_t, credential_t) Sasl_authenticator.request_t
-            #Iom_reactor.tx -> id_t Sasl_mechanism.service) list
+            #Iom_gadget.tx -> id_t Sasl_mechanism.service) list
 end
 
 module type SASL_Loopback_T = sig
         g:Beep_channel.M_profile.t list -> ?srv:string ->
         ?loc:#Beep_locale.t ->
         (P.id_t, P.query_t, P.credential_t) Sasl_supplicant.request_t
-            #Iom_reactor.tx ->
-        Beep_sasl.client_tx_t #Iom_reactor.rx ->
-        P.id_t Beep_sasl.control_rx_t #Iom_reactor.tx -> Beep_sasl.client
+            #Iom_gadget.tx ->
+        Beep_sasl.client_tx_t #Iom_gadget.rx ->
+        P.id_t Beep_sasl.control_rx_t #Iom_gadget.tx -> Beep_sasl.client
 
     class service:
         ?loc:#Beep_locale.t ->
         (P.id_t, P.credential_t) Sasl_authenticator.request_t 
-            #Iom_reactor.tx ->
-        P.id_t Beep_sasl.control_rx_t #Iom_reactor.tx ->
+            #Iom_gadget.tx ->
+        P.id_t Beep_sasl.control_rx_t #Iom_gadget.tx ->
         Beep_sasl.service
 
     class virtual core:
                         
             method private virtual client2_:
                 's 'a 'x.
-                (([> `Final | `Error of exn ] as 'x) #Iom_reactor.tx as 'a) ->
-                P.L0.UM.S.t -> Iom_reactor.kernel_t -> ('s, unit) Iom_reactor.t
+                (([> `Final | `Error of exn ] as 'x) #Iom_gadget.tx as 'a) ->
+                P.L0.UM.S.t -> Iom_gadget.kernel_t -> ('s, unit) Iom_gadget.t
             
             method private virtual service2_:
                 's 'a 'x.
-                (([> `Final | `Error of exn ] as 'x) #Iom_reactor.tx as 'a) ->
-                P.L0.UM.S.t -> Iom_reactor.kernel_t -> ('s, unit) Iom_reactor.t
+                (([> `Final | `Error of exn ] as 'x) #Iom_gadget.tx as 'a) ->
+                P.L0.UM.S.t -> Iom_gadget.kernel_t -> ('s, unit) Iom_gadget.t
             
             method private client_:
                 's 'a 'x.
-                (([> `Final | `Error of exn ] as 'x) #Iom_reactor.tx as 'a) ->
-                P.L0.UM.S.t -> Iom_reactor.kernel_t -> ('s, unit) Iom_reactor.t
+                (([> `Final | `Error of exn ] as 'x) #Iom_gadget.tx as 'a) ->
+                P.L0.UM.S.t -> Iom_gadget.kernel_t -> ('s, unit) Iom_gadget.t
             
             method private service_:
                 's 'a 'x.
-                (([> `Final | `Error of exn ] as 'x) #Iom_reactor.tx as 'a) ->
-                P.L0.UM.S.t -> Iom_reactor.kernel_t -> ('s, unit) Iom_reactor.t
+                (([> `Final | `Error of exn ] as 'x) #Iom_gadget.tx as 'a) ->
+                P.L0.UM.S.t -> Iom_gadget.kernel_t -> ('s, unit) Iom_gadget.t
         end
 end
 
 module SASL_loopback(P: SASL_Loopback_Profile_T):
     (SASL_Loopback_T with module P = P) =
 struct
-    open Iom_reactor
+    open Iom_gadget
     open Cf_cmonad.Op
     
     module P = P
                         
             method private virtual client2_:
                 's 'a 'x.
-                (([> `Final | `Error of exn ] as 'x) #Iom_reactor.tx as 'a) ->
-                P.L0.UM.S.t -> Iom_reactor.kernel_t -> ('s, unit) Iom_reactor.t
+                (([> `Final | `Error of exn ] as 'x) #Iom_gadget.tx as 'a) ->
+                P.L0.UM.S.t -> Iom_gadget.kernel_t -> ('s, unit) Iom_gadget.t
             
             method private virtual service2_:
                 's 'a 'x.
-                (([> `Final | `Error of exn ] as 'x) #Iom_reactor.tx as 'a) ->
-                P.L0.UM.S.t -> Iom_reactor.kernel_t -> ('s, unit) Iom_reactor.t
+                (([> `Final | `Error of exn ] as 'x) #Iom_gadget.tx as 'a) ->
+                P.L0.UM.S.t -> Iom_gadget.kernel_t -> ('s, unit) Iom_gadget.t
 
             method private client_ topTx socket k =
                 let topTx = (topTx :> [ `Final | `Error of exn ] tx) in
     SASL_loopback(SASL_loopback_profile_tcp4_anonymous)
 
 module T3 = struct
-    open Iom_reactor
+    open Iom_gadget
     open Cf_cmonad.Op
     
     module L = SASL_loopback_tcp4_anonymous

sasl/sasl_anonymous.ml

                 v
 end
 
-module R = Iom_reactor
+module G = Iom_gadget
 module Mech = Sasl_mechanism
 module Auth = Sasl_authenticator
 module Supp = Sasl_supplicant
 type credential_t = [ `Cr_anonymous of Id.t ]
 
 class ['id] client suppTxTx =
-    let suppTxTx = (suppTxTx :> ('id, 'q, 'cr) Supp.request_t R.tx) in
+    let suppTxTx = (suppTxTx :> ('id, 'q, 'cr) Supp.request_t G.tx) in
     object(self)
         inherit ['identity] Mech.client_core ~name:name_ ~sec:properties_
         
         method core ctrlRx ctrlTx =
-            let ctrlRx = (ctrlRx :> Mech.client_tx_t R.rx) in
-            let ctrlTx = (ctrlTx :> 'id Mech.client_rx_t R.tx) in
+            let ctrlRx = (ctrlRx :> Mech.client_tx_t G.rx) in
+            let ctrlTx = (ctrlTx :> 'id Mech.client_rx_t G.tx) in
             let rec loop () =
-                R.load >>= fun state ->
-                R.guard begin
+                G.load >>= fun state ->
+                G.guard begin
                     ctrlRx#get do_ctrlRx_ >>= fun () ->
                     match state with
                     | `Pend suppRx ->
-                        let suppRx = (suppRx :> ('id * 'cr) option R.rx) in
+                        let suppRx = (suppRx :> ('id * 'cr) option G.rx) in
                         suppRx#get do_suppRx_
                     | _ ->
                         Cf_cmonad.return ()
                 | Some (id, cr) ->
                     match cr with
                     | `Cr_anonymous cr ->
-                        R.store (`Fini id) >>= fun () ->
+                        G.store (`Fini id) >>= fun () ->
                         let s = Id.to_string cr in
                         let m = Cf_message.create s in
                         ctrlTx#put (`Continue m) >>= loop
                     | _ ->
                         put_error_ Err.X_supplicant_error
             and do_ctrlRx_ event =
-                R.load >>= fun state ->
+                G.load >>= fun state ->
                 match state, event with
                 | `Fini id, `Final None -> ctrlTx#put (`Done (id, None))
                 | `Fini id, `Final _ -> put_error_ Err.X_mechanism_error
             and put_error_ e =
                 ctrlTx#put (`Error (Err.X e))
             in
-            R.simplex >>= fun (suppRx, suppTx) ->
-            let suppRx = (suppRx :> ('id * 'cr) option R.rx) in
+            G.simplex >>= fun (suppRx, suppTx) ->
+            let suppRx = (suppRx :> ('id * 'cr) option G.rx) in
             suppTxTx#put (Supp.Request (`Q_anonymous, suppTx)) >>= fun () ->
-            R.start (loop ()) (`Pend suppRx)
+            G.start (loop ()) (`Pend suppRx)
     end
 
 class ['id] service authTxTx =
-    let authTxTx = (authTxTx :> ('id, 'cr) Auth.request_t R.tx) in
+    let authTxTx = (authTxTx :> ('id, 'cr) Auth.request_t G.tx) in
     object(self)
         inherit ['identity] Mech.service_core ~name:name_ ~sec:properties_
         
         method core ctrlRx ctrlTx =
-                let ctrlRx = (ctrlRx :> Mech.service_tx_t R.rx) in
-                let ctrlTx = (ctrlTx :> 'identity Mech.service_rx_t R.tx) in
-                R.simplex >>= fun (authRx, authTx) ->
-                let authRx = (authRx :> 'id Auth.answer_t R.rx) in
+                let ctrlRx = (ctrlRx :> Mech.service_tx_t G.rx) in
+                let ctrlTx = (ctrlTx :> 'identity Mech.service_rx_t G.tx) in
+                G.simplex >>= fun (authRx, authTx) ->
+                let authRx = (authRx :> 'id Auth.answer_t G.rx) in
                 let rec loop () =
-                    R.guard begin
+                    G.guard begin
                         ctrlRx#get do_ctrlRx_ >>= fun () ->
                         authRx#get do_authRx_
                     end
                 and do_ctrlRx_ event =
-                    R.load >>= fun state ->
+                    G.load >>= fun state ->
                     match event with
                     | `Prompt ->
                         put_error_ Err.X_mechanism_error
                                 let cr = `Cr_anonymous cr in
                                 let req = Auth.Request (cr, authTx) in
                                 authTxTx#put req >>= fun () ->
-                                R.store 1 >>= loop
+                                G.store 1 >>= loop
                         end
                         else
                             put_error_ Err.X_control_error
                     | `Cancel ->
-                        R.store 0 >>= loop
+                        G.store 0 >>= loop
                     | `Abort ->
                         Cf_cmonad.return ()
                 and do_authRx_ event =
                 and put_error_ e =
                     ctrlTx#put (`Error (Err.X e))
                 in
-                R.start (loop ()) 0
+                G.start (loop ()) 0
     end
 
 (*--- End of File [ sasl_anonymous.ml ] ---*)

sasl/sasl_anonymous.mli

 
 class ['id] client:
     ('id, [> query_t ], [> credential_t ]) Sasl_supplicant.request_t
-        #Iom_reactor.tx ->
+        #Iom_gadget.tx ->
     ['id] Sasl_mechanism.client
 
 class ['id] service:
-    ('id, [> credential_t ]) Sasl_authenticator.request_t #Iom_reactor.tx ->
+    ('id, [> credential_t ]) Sasl_authenticator.request_t #Iom_gadget.tx ->
     ['id] Sasl_mechanism.service
 
 (*--- End of File [ sasl_anonymous.mli ] ---*)

sasl/sasl_authenticator.ml

   OF THE POSSIBILITY OF SUCH DAMAGE. 
  *---------------------------------------------------------------------------*)
 
-module R = Iom_reactor
+module G = Iom_gadget
 open Cf_cmonad.Op
 
 module Err = Sasl_error
 module Sec = Sasl_security
 
 type 'id answer_t = Accept of 'id | Deny | Error of exn
-type ('id, 'cr) request_t = Request of 'cr * 'id answer_t R.tx
+type ('id, 'cr) request_t = Request of 'cr * 'id answer_t G.tx
 
 class type ['id, 'cr] core =
     object
-        method authenticator: 's. ('id, 'cr) request_t R.rx -> ('s, unit) R.t
+        method authenticator: 's. ('id, 'cr) request_t G.rx -> ('s, unit) G.t
     end
 
 class virtual ['id, 'cr] simple =
         method private virtual answer_: 'cr -> 'id answer_t
     
         method authenticator:
-            's. ('id, 'cr) request_t R.rx -> ('s, unit) R.t =
-            fun (eventRx : ('id, 'cr) request_t R.rx) ->
+            's. ('id, 'cr) request_t G.rx -> ('s, unit) G.t =
+            fun (eventRx : ('id, 'cr) request_t G.rx) ->
                 let rec loop () =
-                    R.guard (eventRx#get do_eventRx_)
+                    G.guard (eventRx#get do_eventRx_)
                 and do_eventRx_ (Request (id, ansTx)) =
                     ansTx#put (self#answer_ id) >>= loop
                 in
-                R.start (loop ()) ()
+                G.start (loop ()) ()
     end
 
 let start a =
     let a = (a :> ('id, 'cr) core) in
-    R.simplex >>= fun (chRx, chTx) ->
+    G.simplex >>= fun (chRx, chTx) ->
     a#authenticator chRx >>= fun () ->
     Cf_cmonad.return chTx
 

sasl/sasl_authenticator.mli

  *---------------------------------------------------------------------------*)
 
 type 'id answer_t = Accept of 'id | Deny | Error of exn
-type ('id, 'cr) request_t = Request of 'cr * 'id answer_t Iom_reactor.tx
+type ('id, 'cr) request_t = Request of 'cr * 'id answer_t Iom_gadget.tx
 
 class type ['id, 'cr] core =
     object
         method authenticator:
-            's. ('id, 'cr) request_t Iom_reactor.rx -> ('s, unit) Iom_reactor.t
+            's. ('id, 'cr) request_t Iom_gadget.rx -> ('s, unit) Iom_gadget.t
     end
 
 class virtual ['id, 'cr] simple:
     end
 
 val start:
-    ('id, 'cr) #core -> ('s, ('id, 'cr) request_t Iom_reactor.tx) Iom_reactor.t
+    ('id, 'cr) #core -> ('s, ('id, 'cr) request_t Iom_gadget.tx) Iom_gadget.t
 
 (*--- End of File [ sasl_authenticator.mli ] ---*)

sasl/sasl_mechanism.ml

   OF THE POSSIBILITY OF SUCH DAMAGE. 
  *---------------------------------------------------------------------------*)
 
-module R = Iom_reactor
+module G = Iom_gadget
 open Cf_cmonad.Op
 
 module Sec = Sasl_security
         method security_properties = (sec : Sasl_security.properties_t)
 
         method virtual core:
-            's 'a 'b. ('tx #R.rx as 'a) -> ('rx #R.tx as 'b) -> ('s, unit) R.t
+            's 'a 'b. ('tx #G.rx as 'a) -> ('rx #G.tx as 'b) -> ('s, unit) G.t
     end
 
 class virtual ['id] client_core = ['id, 'id client_rx_t, client_tx_t] core
         inherit ['id, 'rx, 'tx] core
 
         method core:
-            's 'a 'b. ('tx #Iom_reactor.rx as 'a) ->
-            ('rx #Iom_reactor.tx as 'b) -> ('s, unit) Iom_reactor.t
+            's 'a 'b. ('tx #Iom_gadget.rx as 'a) ->
+            ('rx #Iom_gadget.tx as 'b) -> ('s, unit) Iom_gadget.t
     end
 
 class type ['id] client = ['id, 'id client_rx_t, client_tx_t] t
 
 let start c =
     let c = (c :> ('id, 'rx, 'tx) t) in
-    R.duplex >>= fun ((ctrlRx, ctrlTx), ctrlIO) ->
+    G.duplex >>= fun ((ctrlRx, ctrlTx), ctrlIO) ->
     c#core ctrlRx ctrlTx >>= fun () ->
     Cf_cmonad.return ctrlIO
 

sasl/sasl_mechanism.mli

         method security_properties: Sasl_security.properties_t
 
         method virtual core:
-            's 'a 'b. ('tx #Iom_reactor.rx as 'a) ->
-            ('rx #Iom_reactor.tx as 'b) -> ('s, unit) Iom_reactor.t
+            's 'a 'b. ('tx #Iom_gadget.rx as 'a) ->
+            ('rx #Iom_gadget.tx as 'b) -> ('s, unit) Iom_gadget.t
     end
 
 class virtual ['id] client_core:
         inherit ['id, 'rx, 'tx] core
 
         method core:
-            's 'a 'b. ('tx #Iom_reactor.rx as 'a) ->
-            ('rx #Iom_reactor.tx as 'b) -> ('s, unit) Iom_reactor.t
+            's 'a 'b. ('tx #Iom_gadget.rx as 'a) ->
+            ('rx #Iom_gadget.tx as 'b) -> ('s, unit) Iom_gadget.t
     end
 
 class type ['id] client = ['id, 'id client_rx_t, client_tx_t] t
 
 val start:
     ('id, 'rx, 'tx) #t ->
-    ('s, 'rx Iom_reactor.rx * 'tx Iom_reactor.tx) Iom_reactor.t
+    ('s, 'rx Iom_gadget.rx * 'tx Iom_gadget.tx) Iom_gadget.t
 
 (*--- End of File [ sasl_mechanism.mli ] ---*)

sasl/sasl_supplicant.ml

   OF THE POSSIBILITY OF SUCH DAMAGE. 
  *---------------------------------------------------------------------------*)
 
-module R = Iom_reactor
+module G = Iom_gadget
 open Cf_cmonad.Op
 
 module Sec = Sasl_security
 module Err = Sasl_error
 
-type ('id, 'q, 'cr) request_t = Request of 'q * ('id * 'cr) option R.tx
+type ('id, 'q, 'cr) request_t = Request of 'q * ('id * 'cr) option G.tx
 
 class type ['id, 'q, 'cr] core =
     object
-        method supplicant: 's. ('id, 'q, 'cr) request_t R.rx -> ('s, unit) R.t
+        method supplicant: 's. ('id, 'q, 'cr) request_t G.rx -> ('s, unit) G.t
     end
 
 class virtual ['id, 'q, 'cr] simple id =
         method private virtual query_: 'q -> 'cr
 
         method supplicant:
-            's. ('id, 'q, 'cr) request_t R.rx -> ('s, unit) R.t =
+            's. ('id, 'q, 'cr) request_t G.rx -> ('s, unit) G.t =
             fun reqRx ->
-                let reqRx = (reqRx :> ('id, 'q, 'cr) request_t R.rx) in
+                let reqRx = (reqRx :> ('id, 'q, 'cr) request_t G.rx) in
                 let rec loop () =
-                    R.guard begin
+                    G.guard begin
                         reqRx#get begin fun (req : ('id, 'q, 'cr) request_t) ->
                             let Request (q, ansTx) = req in
                             ansTx#put (Some (id, self#query_ q)) >>= loop
                         end
                     end
                 in
-                R.start (loop ()) ()
+                G.start (loop ()) ()
     end
 
 let start s =
     let s = (s :> ('id, 'q, 'cr) core) in
-    R.simplex >>= fun (chRx, chTx) ->
+    G.simplex >>= fun (chRx, chTx) ->
     s#supplicant chRx >>= fun () ->
     Cf_cmonad.return chTx
 

sasl/sasl_supplicant.mli

   OF THE POSSIBILITY OF SUCH DAMAGE. 
  *---------------------------------------------------------------------------*)
 
-open Iom_reactor
+open Iom_gadget
 
 type ('id, 'q, 'cr) request_t = Request of 'q * ('id * 'cr) option tx
 
 (**)
 
 module T1 = struct
-    open Iom_reactor
+    open Iom_gadget
     open Cf_cmonad.Op
     
     module Mech = Sasl_mechanism