wai-websockets 1.3.2.1 → 2.0.0
raw patch · 2 files changed
+7/−7 lines, 2 filesdep ~waidep ~warp
Dependency ranges changed: wai, warp
Files
Network/Wai/Handler/WebSockets.hs view
@@ -22,7 +22,7 @@ -- | For use with 'settingsIntercept' from the Warp web server. intercept :: WS.ServerApp -> Wai.Request- -> Maybe (Source (ResourceT IO) ByteString -> Warp.Connection -> ResourceT IO ())+ -> Maybe (Source IO ByteString -> Warp.Connection -> IO ()) intercept = interceptWith WS.defaultConnectionOptions --------------------------------------------------------------------------------@@ -30,7 +30,7 @@ interceptWith :: WS.ConnectionOptions -> WS.ServerApp -> Wai.Request- -> Maybe (Source (ResourceT IO) ByteString -> Warp.Connection -> ResourceT IO ())+ -> Maybe (Source IO ByteString -> Warp.Connection -> IO ()) interceptWith opts app req = case lookup "upgrade" (Wai.requestHeaders req) of Just s | BC.map toLower s == "websocket" -> Just $ runWebSockets opts req' app@@ -44,9 +44,9 @@ runWebSockets :: WS.ConnectionOptions -> WS.RequestHead -> WS.ServerApp- -> Source (ResourceT IO) ByteString+ -> Source IO ByteString -> Warp.Connection- -> ResourceT IO ()+ -> IO () runWebSockets opts req app _ conn = do (is, os) <- liftIO $ connectionToStreams conn
wai-websockets.cabal view
@@ -1,5 +1,5 @@ Name: wai-websockets-Version: 1.3.2.1+Version: 2.0.0 Synopsis: Provide a bridge betweeen WAI and the websockets package. License: MIT License-file: LICENSE@@ -20,13 +20,13 @@ Build-Depends: base >= 3 && < 5 , bytestring >= 0.9.1.4 , conduit >= 0.5 && < 1.1- , wai >= 1.3 && < 1.5+ , wai >= 2.0 && < 2.1 , blaze-builder >= 0.2.1.4 && < 0.4 , case-insensitive >= 0.2 , network >= 2.2.1.5 , transformers >= 0.2 && < 0.4 , websockets >= 0.8- , warp >= 1.3 && < 1.4+ , warp >= 2.0 && < 2.1 , io-streams >= 1.1 && < 1.2 Exposed-modules: Network.Wai.Handler.WebSockets ghc-options: -Wall