Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use generated js_srv stubs

  • Loading branch information...
commit 2a17ae4897c8ed8d92a5ebaa3993943b5760dcc0 1 parent 819ed58
Jake Donham authored
Showing with 4 additions and 6 deletions.
  1. +4 −6 examples/clicks-comet/server.ml
View
10 examples/clicks-comet/server.ml
@@ -15,20 +15,18 @@ module Server =
struct
let n = ref 0
- let clicks () = !n
+ let clicks () = Lwt.return !n
let click () =
incr n;
Orpc_js_comet_server.iter_sessions server
(fun _ sess ->
let module M = Comet_js_comet_srv (struct let server = server let session = sess end) in
- ignore (M.set_clicks !n))
+ ignore (M.set_clicks !n));
+ Lwt.return ()
end
-let _ = Orpc_js_comet_server.bind server [
- "click", (fun x0 -> Lwt.return (Proto_js_aux.of_click'res (Server.click (Proto_js_aux.to_click'arg x0))));
- "clicks", (fun x0 -> Lwt.return (Proto_js_aux.of_clicks'res (Server.clicks (Proto_js_aux.to_clicks'arg x0))));
-]
+let _ = let module M = Proto_js_srv.Lwt(Server) in Orpc_js_comet_server.bind server M.funcs
let callback conn_id req out =
match Http_request.path req with
Please sign in to comment.
Something went wrong with that request. Please try again.