By the way, I happen to have a little problem when I try to add data
compression/decompression.
Since its impossible to add binary treatments (I call binary treatment a
function which type is: ByteString - ByteString, e.g. compression), I made
my own package binary-communicator. (can be found on
It's amazing!
But I'm surprised no one else has this problem, as I assume using network +
lazy bytestrings is quite frequent when you want to do network programming
in Haskell.
BTW, you may not have the same libraries versions as me. Maybe this problems
doesn't occur in older versions of
Problem tracked!
It comes from the last version of bytestring package.
I tried with bytestring-0.9.1.5, and it works perfectly.
Do you know where I should submit this bug?
-
Yves Parès
Live long and prosper
--
View this message in context:
By the way, Gregory, concerning the package binary-protocol, I was wondering
if it was possible to turn the BinaryProtocol monad from
type BinaryProtocol = StateT (Handle, Handle, ByteString) IO
to:
type BinaryProtocol = StateT (Handle, Handle, ByteString)
And then the functions, like
Am Donnerstag 08 April 2010 09:17:04 schrieb Yves Parès:
Problem tracked!
It comes from the last version of bytestring package.
Alas, it's maybe not so simple.
I tried with bytestring-0.9.1.5, and it works perfectly.
I just tried with bytestring-0.9.1.6 and it worked perfectly for sending
That sounds like a reasonable modification; if you want, free to fork it at
http://github.com/gcross/binary-protocol and push me your proposed changes.
Cheers,
Greg
On Apr 8, 2010, at 9:12 AM, Yves Parès wrote:
By the way, Gregory, concerning the package binary-protocol, I was wondering
Okay,
Guess I will have to learn how to use git.
I used darcs so far...
Concerning the bug in bytestring, I sent a mail to dons. I just still have
no answer.
Gregory Crosswhite-2 wrote:
That sounds like a reasonable modification; if you want, free to fork it
at
I'm wondering, would it be a problem of chunk size when using L.hGetContents?
Since the data to read is shorter than the default chunk size (32k), would
it cause problems?
Yves Parès wrote:
Okay, so I turned off every buffering using hSetBuffering hdl NoBuffering
on both Client and Server,
Am Mittwoch 07 April 2010 19:50:43 schrieb Yves Parès:
I'm wondering, would it be a problem of chunk size when using
L.hGetContents? Since the data to read is shorter than the default chunk
size (32k), would it cause problems?
That shouldn't cause problems. When less than the default chunk
Yes, from what I read, I assumed it had this behavior.
But, then, I don't see why the server holds...
I've posted a mail on Haskell-Cafe called Network: buffering troubles, in
which I put a smaller example which reproduces this problem.
Daniel Fischer-4 wrote:
That shouldn't cause problems.
Am Mittwoch 07 April 2010 20:43:24 schrieb Yves Parès:
Yes, from what I read, I assumed it had this behavior.
But, then, I don't see why the server holds...
I've posted a mail on Haskell-Cafe called Network: buffering troubles,
in which I put a smaller example which reproduces this problem.
I
Am Mittwoch 07 April 2010 21:53:20 schrieb Daniel Fischer:
Am Mittwoch 07 April 2010 20:43:24 schrieb Yves Parès:
Yes, from what I read, I assumed it had this behavior.
But, then, I don't see why the server holds...
I've posted a mail on Haskell-Cafe called Network: buffering
troubles, in
Hello,
I'm trying to use the packages Network and Control.Monad.BinaryProtocol
together, with a very simple program in which a client sends an operation to
the server, which computes the result and sends it back.
But the server holds when trying to receive (Server.hs, line 22), whereas
the
Yay, I'm glad to see someone else using my package. :-)
Hmm, your program seems to work for me. I compiled and ran the Server (with
ghc --make), then compiled and ran the Client, and then typed
Operation 1.0 Mult 2.0
into the Client process, and the result it got was
2.0
Weird...
I use GHC 6.12.1, and I run Ubuntu 9.10 (32bits version).
Would have I miss something? Like a flush or a close? Logically, I don't see
where I would...
Gregory Crosswhite-2 wrote:
Yay, I'm glad to see someone else using my package. :-)
Hmm, your program seems to work for me.
Hmm, I am guessing it is more likely that the problem is that the I/O system
changed from 6.10.4 to 6.12.1 somehow in a way that broke the package. You
could try turning off all buffering in the handle using hSetBuffering and
seeing if that works.
Cheers,
Greg
On Apr 6, 2010, at 3:44 PM,
Okay, so I turned off every buffering using hSetBuffering hdl NoBuffering on
both Client and Server, but I doesn't fix it...
BTW, I tried to do the same without your package, i.e. simply through Lazy
ByteString and Binary, but it doesn't work either, I come up against the
same issue.
Gregory
17 matches
Mail list logo