http-semantics 0.3.0 → 0.3.1
raw patch · 7 files changed
+35/−10 lines, 7 filesdep ~basedep ~time-manager
Dependency ranges changed: base, time-manager
Files
- ChangeLog.md +5/−0
- Network/HTTP/Semantics/Client.hs +2/−0
- Network/HTTP/Semantics/Client/Internal.hs +10/−0
- Network/HTTP/Semantics/FillBuf.hs +1/−4
- Network/HTTP/Semantics/Server.hs +13/−2
- Network/HTTP/Semantics/Types.hs +1/−1
- http-semantics.cabal +3/−3
ChangeLog.md view
@@ -1,5 +1,10 @@ # ChangeLog for http-semantics +## 0.3.1++* Adding defaultAux and auxSendPing for client.+* Adding defaultAux for server.+ ## 0.3.0 * Breaking change: fillFileBodyGetNext takes Sentinel instead of
Network/HTTP/Semantics/Client.hs view
@@ -39,7 +39,9 @@ -- * Aux Aux,+ defaultAux, auxPossibleClientStreams,+ auxSendPing, -- * Types Scheme,
Network/HTTP/Semantics/Client/Internal.hs view
@@ -2,6 +2,7 @@ Request (..), Response (..), Aux (..),+ defaultAux, ) where import Network.HTTP.Semantics.Types (InpObj (..), OutObj (..))@@ -16,4 +17,13 @@ data Aux = Aux { auxPossibleClientStreams :: IO Int -- ^ How many streams can be created without blocking.+ , auxSendPing :: IO ()+ -- ^ Sending a ping. }++defaultAux :: Aux+defaultAux =+ Aux+ { auxPossibleClientStreams = return 0+ , auxSendPing = return ()+ }
Network/HTTP/Semantics/FillBuf.hs view
@@ -1,6 +1,3 @@-{-# LANGUAGE NamedFieldPuns #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} module Network.HTTP.Semantics.FillBuf (@@ -25,7 +22,7 @@ import Data.Int (Int64) import Data.Maybe import Foreign.Ptr (plusPtr)-import Network.ByteOrder+import Network.ByteOrder hiding (start) import Network.HTTP.Semantics.Client ----------------------------------------------------------------
Network/HTTP/Semantics/Server.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE OverloadedStrings #-}- module Network.HTTP.Semantics.Server ( -- * HTTP server Server,@@ -20,6 +18,7 @@ -- * Aux Aux,+ defaultAux, auxTimeHandle, auxMySockAddr, auxPeerSockAddr,@@ -66,12 +65,24 @@ import qualified Data.ByteString.UTF8 as UTF8 import Data.IORef import qualified Network.HTTP.Types as H+import Network.Socket+import qualified System.TimeManager as T import Network.HTTP.Semantics import Network.HTTP.Semantics.File import Network.HTTP.Semantics.ReadN import Network.HTTP.Semantics.Server.Internal import Network.HTTP.Semantics.Status++----------------------------------------------------------------++defaultAux :: Aux+defaultAux =+ Aux+ { auxTimeHandle = T.emptyHandle+ , auxMySockAddr = SockAddrInet 0 0+ , auxPeerSockAddr = SockAddrInet 0 0+ } ----------------------------------------------------------------
Network/HTTP/Semantics/Types.hs view
@@ -61,7 +61,7 @@ | OutBodyFile FileSpec data OutBodyIface = OutBodyIface- { outBodyUnmask :: (forall x. IO x -> IO x)+ { outBodyUnmask :: forall x. IO x -> IO x -- ^ Unmask exceptions in the thread spawned for the request body -- -- This is used in the client: we spawn the new thread for the request body
http-semantics.cabal view
@@ -1,12 +1,12 @@ cabal-version: 3.0 name: http-semantics-version: 0.3.0+version: 0.3.1 license: BSD-3-Clause license-file: LICENSE maintainer: Kazu Yamamoto <kazu@iij.ad.jp> author: Kazu Yamamoto <kazu@iij.ad.jp> homepage: https://github.com/kazu-yamamoto/http-semantics-synopsis: HTTP senmatics libarry+synopsis: HTTP semantics library description: Version-independent common parts of HTTP category: Network build-type: Simple@@ -46,5 +46,5 @@ http-types >=0.12 && <0.13, network, network-byte-order,- time-manager,+ time-manager >= 0.2.4, utf8-string