package websocket

  1. Overview
  2. Docs
Websocket library

Install

dune-project
 Dependency

Authors

Maintainers

Sources

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

doc/websocket/Websocket/index.html

Module WebsocketSource

Sourceval websocket_uuid : string
Sourceval b64_encoded_sha1sum : string -> string
Sourceval upgrade_present : Cohttp.Header.t -> bool
Sourceexception Protocol_error of string
Sourcemodule Rng : sig ... end
Sourcemodule Frame : sig ... end
Sourceval check_origin : ?origin_mandatory:bool -> hosts:string list -> Cohttp.Request.t -> bool

check_origin ~hosts req will return true if the origin header exists and matches one of the provided hostnames. If origin header is not present, return not origin_mandatory. Default value of origin_mandatory is false. If origin header is present but does not contain a hostname, return false. Hostnames in hosts are (ascii-)lowercased when compared.

Sourceval check_origin_with_host : Cohttp.Request.t -> bool

check_origin_with_host returns false if the origin header exists and its host doesn't match the host header

Sourcemodule type S = sig ... end
Sourcemodule Make (IO : Cohttp.S.IO) : S with type 'a IO.t = 'a IO.t and type IO.ic = IO.ic and type IO.oc = IO.oc