Module Webs_bazaar.Websocket

Websocket upgrade logic.

References.

Upgrading

val upgradable : Webs.Http.Headers.t -> bool

upgradable hs is true iff hs has a header Webs.Http.Headers.connection with an "upgrade" value and a header Webs.Http.Headers.upgrade with a "websocket" value.

upgrade responds to upgrade the request to a websocket

Headers names

val sec_websocket_accept : Webs.Http.Headers.Name.t
val sec_websocket_extensions : Webs.Http.Headers.Name.t
val sec_websocket_key : Webs.Http.Headers.Name.t
val sec_websocket_protocol : Webs.Http.Headers.Name.t
val sec_websocket_version : Webs.Http.Headers.Name.t

Handshake

val accept_key : string -> string

accept_key k is a value for the sec-websocket-accept header from the k value of the sec-websocket-key header.