package shuttle_websocket

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Config : sig ... end

create accepts a user provided websocket-handler and performs an HTTP/1.1 protocol upgrade. create returns a http response that either represents an error indicating a bad upgrade request, or contains a `Switching-Protocol` response with an HTTP protocol upgrade handler. If the protocol negotiation succeeds the user provided websocket handler will be called with a websocket descriptor. Once the deferred returned by the websocket-handler is resolved, or if there are any unhandled exceptions in the handler the underlying TCP connection is closed.

OCaml

Innovation. Community. Security.