http-exchange-instantiations 0.1.2.0 → 0.1.2.1
raw patch · 3 files changed
+17/−1 lines, 3 files
Files
- CHANGELOG.md +8/−0
- http-exchange-instantiations.cabal +1/−1
- src/Http/Exchange/Tls.hs +8/−0
CHANGELOG.md view
@@ -1,5 +1,13 @@ # Revision history for http-exchange-instantiations +## 0.1.2.1 -- 2023-09-21++* Add missing `exposeInterruptibleContext`.++## 0.1.2.0 -- 2023-09-20++* Add functions for HTTP exchanges over TLS without timeout.+ ## 0.1.1.0 -- 2023-08-30 * Add `exchangeInterruptible` and `exchangeTimeout`.
http-exchange-instantiations.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: http-exchange-instantiations-version: 0.1.2.0+version: 0.1.2.1 synopsis: Instantiations of http-exchange -- description: license: BSD-3-Clause
src/Http/Exchange/Tls.hs view
@@ -9,6 +9,7 @@ , exchangeInterruptible , exchangeTimeout , interruptibleContextNew+ , exposeInterruptibleContext -- * Types , InterruptibleContext , SocketThrowingNetworkException(..)@@ -217,6 +218,13 @@ let backend = buildInterruptibleBackend socket intrRef context <- Tls.contextNew backend params pure (InterruptibleContext context intrRef)++-- | Expose the TLS context. Do not call TLS data-exchange functions like+-- @sendData@ or @recvData@ on this context. This context is exposed so+-- that the caller can query it for metadata about the session (certs, etc.).+exposeInterruptibleContext :: InterruptibleContext -> Tls.Context+{-# inline exposeInterruptibleContext #-}+exposeInterruptibleContext (InterruptibleContext c _) = c buildInterruptibleBackend :: Socket -> IORef (TVar Bool) -> Tls.Backend buildInterruptibleBackend s !intrRef = Tls.Backend