[Haskell-cafe] test socket buffer full

Alberto G. Corona agocorona at gmail.com
Thu Sep 17 12:46:01 UTC 2015


It apparently works under ghc 7.8.3 and windows 10. anyway I did not
noticed it.
I  usually  insert withSocketsDo too.

2015-09-17 14:09 GMT+02:00 Brandon Allbery <allbery.b at gmail.com>:

> On Thu, Sep 17, 2015 at 5:50 AM, Alberto G. Corona <agocorona at gmail.com>
> wrote:
>
>> That happens in Windows and Linux, in a single process (like in the
>> example) or within two processes in the same machine.
>
>
> I'm a little surprised this program works at all on Windows, because the
> winsock stuff gets torn down when `withSocketsDo $ listenOn port` is done?
> And you do other socket ops outside of withSocketsDo.
>
> Otherwise, it looks like you check for n < 1, not n < l; you would only
> detect buffer-full if the entire write failed, not for partial writes.
>
> --
> brandon s allbery kf8nh                               sine nomine
> associates
> allbery.b at gmail.com
> ballbery at sinenomine.net
> unix, openafs, kerberos, infrastructure, xmonad
> http://sinenomine.net
>



-- 
Alberto.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150917/8debba28/attachment.html>


More information about the Haskell-Cafe mailing list