Check if a WAI request is a WebSocket upgrade request.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Network.Wai.Handler.WebSockets.websocketsApp
(_opts : WebSockets.ConnectionOptions)
(wsApp : WebSockets.ServerApp)
(req : Request)
:
Try to upgrade a WAI request to a WebSocket connection.
Returns some response (a raw response that performs the handshake)
if the request is a WebSocket upgrade, none otherwise.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Network.Wai.Handler.WebSockets.websocketsOr
(opts : WebSockets.ConnectionOptions)
(wsApp : WebSockets.ServerApp)
(backup : Application)
:
Combine a WebSocket app with a regular WAI app. WebSocket requests go to the WS app, everything else to the backup. $$\text{websocketsOr} : \text{ConnectionOptions} \to \text{ServerApp} \to \text{Application} \to \text{Application}$$
Equations
- One or more equations did not get rendered due to their size.