package websocket-lwt-unix

  1. Overview
  2. Docs
Websocket library (Lwt)

Install

Dune Dependency

Authors

Maintainers

Sources

websocket-2.14.tbz
sha256=30e40d098da86fb5f6b2adbc53211503c6e0c20422c21a7b41c8ac83168ca439
sha512=ae4246f66a15cc3eb9a8fbd11bb5551fe77fb5ae93d31e8d8636c0b254e2d93ac3d5663604731a5b6ed28897cdb5677b6a96b1ce3d993b4720fd09549f1bf9ad

doc/websocket-lwt-unix.cohttp/Websocket_cohttp_lwt/index.html

Module Websocket_cohttp_lwt

val upgrade_connection : Cohttp.Request.t -> (Websocket.Frame.t -> unit) -> (Cohttp_lwt_unix.Server.response_action * (Websocket.Frame.t option -> unit)) Lwt.t

upgrade_connection req incoming_handler takes req, a connection request, and incoming_handler, a function that will process incoming websocket frames, and returns (response_action, push_frame) where response_action is used to produce a Cohttp_lwt.Server.t and push_frame is used to send websocket frames to the client.

OCaml

Innovation. Community. Security.