packages feed

network-bytestring 0.1.3 → 0.1.3.1

raw patch · 3 files changed

+17/−15 lines, 3 filesdep ~base

Dependency ranges changed: base

Files

Network/Socket/ByteString/Lazy.hsc view
@@ -25,13 +25,13 @@   ( #if !defined(mingw32_HOST_OS)     -- * Send data to a socket-    send,-    sendAll,+      send+    , sendAll #endif      -- * Receive data from a socket-    getContents,-    recv+    , getContents+    , recv   ) where  import Control.Monad (liftM)@@ -45,7 +45,7 @@ import qualified Network.Socket.ByteString as N  #if !defined(mingw32_HOST_OS)-import Control.Monad (when)+import Control.Monad (unless) import Data.ByteString.Unsafe (unsafeUseAsCStringLen) import Foreign.Marshal.Array (allocaArray) import Foreign.Ptr (plusPtr)@@ -112,7 +112,8 @@         -> IO () sendAll sock bs = do   sent <- send sock bs-  when (sent < L.length bs) $ sendAll sock (L.drop sent bs)+  let bs' = L.drop sent bs+  unless (L.null bs') $ sendAll sock bs' #endif  -- -----------------------------------------------------------------------------
network-bytestring.cabal view
@@ -1,5 +1,5 @@ name:                network-bytestring-version:             0.1.3+version:             0.1.3.1 synopsis:            Fast, memory-efficient, low-level networking description:         Fast, memory-efficient, low-level socket functions                      that use 'Data.ByteString's instead of 'String's.@@ -26,7 +26,7 @@       Network.Socket.ByteString.MsgHdr    build-depends:-    base       < 4.3,+    base       < 4.4,     bytestring < 1.0,     network    >= 2.2.1.1 && < 2.3 
tests/Simple.hs view
@@ -131,10 +131,11 @@     when (errors counts + failures counts > 0) exitFailure  tests :: Test-tests = TestList [TestLabel "testLazySend" testLazySend,-                  TestLabel "testSendAll" testSendMany,-                  TestLabel "testSendMany" testSendMany,-                  TestLabel "testRecv" testRecv,-                  TestLabel "testOverFlowRecv" testOverFlowRecv,-                  TestLabel "testRecvFrom" testRecvFrom,-                  TestLabel "testOverFlowRecvFrom" testOverFlowRecvFrom]+tests = TestList [ TestLabel "testLazySend" testLazySend+                 , TestLabel "testSendAll" testSendMany+                 , TestLabel "testSendMany" testSendMany+                 , TestLabel "testRecv" testRecv+                 , TestLabel "testOverFlowRecv" testOverFlowRecv+                 , TestLabel "testRecvFrom" testRecvFrom+                 , TestLabel "testOverFlowRecvFrom" testOverFlowRecvFrom+                 ]