packages feed

websockets 0.9.3.1 → 0.9.4.0

raw patch · 4 files changed

+18/−5 lines, 4 filesdep ~attoparsec

Dependency ranges changed: attoparsec

Files

CHANGELOG view
@@ -1,3 +1,7 @@+- 0.9.4.0+    * Add `makePendingConnectionFromStream` function+    * Bump `attoparsec` dependency+ - 0.9.3.1     * Bump `QuickCheck` dependency 
src/Network/WebSockets.hs view
@@ -53,6 +53,7 @@       -- * Utilities for writing your own server     , makeListenSocket     , makePendingConnection+    , makePendingConnectionFromStream        -- * Running a client     , ClientApp
src/Network/WebSockets/Server.hs view
@@ -9,6 +9,7 @@     , runServerWith     , makeListenSocket     , makePendingConnection+    , makePendingConnectionFromStream     ) where  @@ -92,8 +93,15 @@ -- | Turns a socket, connected to some client, into a 'PendingConnection'. makePendingConnection     :: Socket -> ConnectionOptions -> IO PendingConnection-makePendingConnection sock opts = do-    stream   <- Stream.makeSocketStream sock+makePendingConnection socket opts = do+    stream  <- Stream.makeSocketStream socket+    makePendingConnectionFromStream stream opts++-- | More general version of 'makePendingConnection' for 'Stream.Stream'+-- instead of a 'Socket'.+makePendingConnectionFromStream+    :: Stream.Stream -> ConnectionOptions -> IO PendingConnection+makePendingConnectionFromStream stream opts = do     -- TODO: we probably want to send a 40x if the request is bad?     mbRequest <- Stream.parse stream (decodeRequestHead False)     case mbRequest of
websockets.cabal view
@@ -1,5 +1,5 @@ Name:    websockets-Version: 0.9.3.1+Version: 0.9.4.0  Synopsis:   A sensible and clean way to write WebSocket-capable servers in Haskell.@@ -64,7 +64,7 @@     Network.WebSockets.Types    Build-depends:-    attoparsec        >= 0.10   && < 0.13,+    attoparsec        >= 0.10   && < 0.14,     base              >= 4      && < 5,     base64-bytestring >= 0.1    && < 1.1,     binary            >= 0.5    && < 0.8,@@ -99,7 +99,7 @@     test-framework-hunit       >= 0.2 && < 0.4,     test-framework-quickcheck2 >= 0.2 && < 0.4,     -- Copied from regular dependencies...-    attoparsec        >= 0.10   && < 0.13,+    attoparsec        >= 0.10   && < 0.14,     base              >= 4      && < 5,     base64-bytestring >= 0.1    && < 1.1,     binary            >= 0.5    && < 0.8,