From 3e05f3a3bf886c302fb6d6caa7ee92cf9736b6ad Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 28 Feb 2013 23:33:45 -0400 Subject: [PATCH] NoDelay does not work on Android (I think the other change is no-op) --- Data/Conduit/Network/Utils.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Data/Conduit/Network/Utils.hs b/Data/Conduit/Network/Utils.hs index 32a7286..01ff84e 100644 --- a/Data/Conduit/Network/Utils.hs +++ b/Data/Conduit/Network/Utils.hs @@ -6,14 +6,14 @@ module Data.Conduit.Network.Utils , getSocket ) where -import Network.Socket (AddrInfo, Socket, SocketType) +import Network.Socket (Socket, SocketType) import qualified Network.Socket as NS import Data.String (IsString (fromString)) import Control.Exception (bracketOnError, IOException) import qualified Control.Exception as E -- | Attempt to connect to the given host/port using given @SocketType@. -getSocket :: String -> Int -> SocketType -> IO (Socket, AddrInfo) +getSocket :: String -> Int -> SocketType -> IO (Socket, NS.AddrInfo) getSocket host' port' sockettype = do let hints = NS.defaultHints { NS.addrFlags = [NS.AI_ADDRCONFIG] @@ -93,7 +93,7 @@ bindPort p s sockettype = do sockOpts = case sockettype of NS.Datagram -> [(NS.ReuseAddr,1)] - _ -> [(NS.NoDelay,1), (NS.ReuseAddr,1)] + _ -> [(NS.ReuseAddr,1)] -- Android seems to not have NoDelay theBody addr = bracketOnError -- 1.7.10.4