Module Webs_websocket

Websocket upgrades.

References.

Upgrading

val upgradable : Webs.Http.headers -> bool

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

val upgrade : Webs.service

upgrade responds to upgrade the request to a websocket.

FIXME handle protocols, doc details.

Headers

val sec_websocket_accept : Webs.Http.name
val sec_websocket_extensions : Webs.Http.name
val sec_websocket_key : Webs.Http.name
val sec_websocket_protocol : Webs.Http.name
val sec_websocket_version : Webs.Http.name

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.