package websocket-lwt-unix

  1. Overview
  2. Docs
Websocket library (Lwt)

Install

Dune Dependency

Authors

Maintainers

Sources

websocket-2.17.tbz
sha256=39af5eb5534b2df5b65ccf700b0a620438be5f09864a8e80b48ab60ee67a7a9c
sha512=a8cd168236acfa1156fac5a007fe6875a35f8fb03eee30a94eb712a2dc981a967bb8fb74fdd7aa7892d148176070333d49311ea9600f5a210e56be8da32197c8

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

Module Websocket_cohttp_lwtSource

Sourceval 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.