<div dir="ltr">It apparently works under ghc 7.8.3 and windows 10. anyway I did not noticed it. <div>I usually insert withSocketsDo too.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-17 14:09 GMT+02:00 Brandon Allbery <span dir="ltr"><<a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span class=""><div class="gmail_quote">On Thu, Sep 17, 2015 at 5:50 AM, Alberto G. Corona <span dir="ltr"><<a href="mailto:agocorona@gmail.com" target="_blank">agocorona@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">That happens in Windows and Linux, in a single process (like in the example) or within two processes in the same machine.</blockquote></div><br></span>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.</div><div class="gmail_extra"><br></div><div class="gmail_extra">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.<span class="HOEnZb"><font color="#888888"><br><div><br></div>-- <br><div><div dir="ltr"><div>brandon s allbery kf8nh sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a> <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Alberto.</div>
</div>