On Sat, Jun 16, 2007 at 04:17:39PM +0100, Eric wrote: > import Network > import System.IO > import Data.ByteString as Bits(ByteString, hGetContents) > > soc <- listenOn $ PortNumber 2007 > (hdl, host, port) <- accept soc > hSetBuffering hdl No Buffering; > bs <- Bits.hGetContents hdl; -- blocks here despite previous line
I think it's because you are using the strict ByteString module version. Its hGetContents just has to the whole input. Try with Data.ByteString.Lazy. Best regards Tomek _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe