-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbridge.mli
31 lines (22 loc) · 832 Bytes
/
bridge.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
(*
* iocamlserver - IOCaml notebook server
*
* (c) 2014 MicroJamJar Ltd
*
* Author(s): [email protected]
* Description: bridge websockets and zmq sockets
*
*)
open Iocaml_zmq
type ws_stream = Websocket_lwt.Frame.t Lwt_stream.t
type ws_push = Websocket_lwt.Frame.t -> unit Lwt.t
type ws_comm = ws_stream * ws_push
val zmq_of_ws_message : string -> string list
val ws_of_zmq_message : string list -> string
val ws_to_zmq : int -> string -> ws_stream -> 'a Lwt_zmq.Socket.t -> unit Lwt.t
val zmq_to_ws : int -> string -> 'a Lwt_zmq.Socket.t -> ws_push -> unit Lwt.t
val ws_zmq_comms : int -> string -> 'a Lwt_zmq.Socket.t -> Uri.t -> ws_comm -> unit Lwt.t
val ws_init : int ->
(int ->
Cohttp.Request.t ->
(unit -> Websocket_lwt.Frame.t Lwt.t) -> (Websocket_lwt.Frame.t -> unit Lwt.t) -> unit Lwt.t)