on master help sign in
Version bump
52e7dd0Michael Snoyman
warp/ChangeLog.md+4
@@ -1,3 +1,7 @@
1+## 3.2.4
2+
3+* Added `withApplication`, `testWithApplication`, and `openFreePort`
4+
1## 3.2.3
5## 3.2.3
2
6
3* Using http2 v1.5.x which much improves the performance of HTTP/2.
7* Using http2 v1.5.x which much improves the performance of HTTP/2.
warp/Network/Wai/Handler/Warp/WithApplication.hs+6
@@ -18,6 +18,8 @@ import Network.Wai.Handler.Warp.Types
18-- | Runs the given 'Application' on a free port. Passes the port to the given
18-- | Runs the given 'Application' on a free port. Passes the port to the given
19-- operation and executes it, while the 'Application' is running. Shuts down the
19-- operation and executes it, while the 'Application' is running. Shuts down the
20-- server before returning.
20-- server before returning.
21+--
22+-- @since 3.2.4
21withApplication :: IO Application -> (Port -> IO a) -> IO a
23withApplication :: IO Application -> (Port -> IO a) -> IO a
22withApplication mkApp action = do
24withApplication mkApp action = do
23 app <- mkApp
25 app <- mkApp
@@ -45,6 +47,8 @@ withApplication mkApp action = do
45--
47--
46-- __The exception handling makes this function unsuitable for use in production.__
48-- __The exception handling makes this function unsuitable for use in production.__
47-- Use 'withApplication' instead.
49-- Use 'withApplication' instead.
50+--
51+-- @since 3.2.4
48testWithApplication :: IO Application -> (Port -> IO a) -> IO a
52testWithApplication :: IO Application -> (Port -> IO a) -> IO a
49testWithApplication mkApp action = do
53testWithApplication mkApp action = do
50 callingThread <- myThreadId
54 callingThread <- myThreadId
@@ -70,6 +74,8 @@ mkWaiter = do
70 }
74 }
71
75
72-- | Opens a socket on a free port and returns both port and socket.
76-- | Opens a socket on a free port and returns both port and socket.
77+--
78+-- @since 3.2.4
73openFreePort :: IO (Port, Socket)
79openFreePort :: IO (Port, Socket)
74openFreePort = do
80openFreePort = do
75 s <- socket AF_INET Stream defaultProtocol
81 s <- socket AF_INET Stream defaultProtocol
warp/warp.cabal+1−1
@@ -1,5 +1,5 @@
1Name: warp
1Name: warp
2−Version: 3.2.3
2+Version: 3.2.4
3Synopsis: A fast, light-weight web server for WAI applications.
3Synopsis: A fast, light-weight web server for WAI applications.
4License: MIT
4License: MIT
5License-file: LICENSE
5License-file: LICENSE