Well I'm always happy to take a public pasting in return for the chance to
learn something :) It's fair to say I didn't fully understand the implications
of TCPs flow-control mechanisms re buffering capacity, and I've been grateful
to be guided here.
> On 4 Sep 2013, at 16:52, Bryan O'Sullivan
On Tue, Sep 3, 2013 at 3:56 PM, Simon Yarde wrote:
> I'm new to Haskell and have reached an impasse in understanding the
> behaviour of sockets.
>
Your question is actually not related to Haskell at all, but is a general
"I don't understand socket programming" question. You're being misled by
th
> On 4 Sep 2013, at 00:49, Gregory Collins wrote:
> If the underlying write operation returns EWOULDBLOCK then the "send"
> function calls into the GHC IO manager with "threadWaitWrite", which
> registers interest in the file descriptor using epoll() and blocks the
> calling Haskell thread unti
On Tue, Sep 3, 2013 at 7:58 PM, Joey Adams wrote:
> On Tue, Sep 3, 2013 at 6:56 PM, Simon Yarde wrote:
>
>> I'm new to Haskell and have reached an impasse in understanding the
>> behaviour of sockets.
>>
>> The crux of my line of enquiry is this; how can my application know when
>> to pause in g
On Tue, Sep 3, 2013 at 6:56 PM, Simon Yarde wrote:
> I'm new to Haskell and have reached an impasse in understanding the
> behaviour of sockets.
>
> The crux of my line of enquiry is this; how can my application know when
> to pause in generating its chunked output if send doesn't block and the
On Wed, Sep 4, 2013 at 12:56 AM, Simon Yarde wrote:
> What's going on? I expected the second and third send operation to return
> 0 bytes sent, because the send buffer can only hold 1 byte.
If the underlying write operation returns EWOULDBLOCK then the "send"
function calls into the GHC IO man
On Tue, Sep 3, 2013 at 6:56 PM, Simon Yarde wrote:
> I've found that setting the send buffer size causes send to truncate the
> ByteString to the buffer size, but that successive sends continue to
> succeed when the buffer should be full.
>
I see no actual flow control here. That the receiver is