[Haskell-cafe] Network: buffering troubles

2010-04-07 Thread Yves Parès
Hello, I have isolated a problem when using (lazy) ByteStrings through the network (GHC 6.12.1, Ubuntu 9.10 32bits): Here is my client: http://old.nabble.com/file/p28162932/Client.hs Client.hs And my server: http://old.nabble.com/file/p28162932/Server.hs Server.hs The server holds until

Re: [Haskell-cafe] Network: buffering troubles

2010-04-07 Thread Yves Parès
Apparently, the trouble seems to come from binary deserialization. When I read my handle with: inp - L.hGet hdl 24 and no longer with: inp - L.hGetContents hdl I get a lazy bytestring which is no longer infinite, and then deserialization occurs right. It proves that at the time of

Re: [Haskell-cafe] Network: buffering troubles

2010-04-07 Thread Yves Parès
News! (Sorry for the spam, but this problem turns to be a headache) The problem actually comes from ByteStrings (either lazy or strict). I reduced my server code to this: import Network import System.IO import qualified Data.ByteString(.Lazy) as L main = do (hdl,_,_) - listenOn (PortNumber