[Haskell-cafe] Re: all threads are blocked by recvFrom

Vitaliy Akimov vitaliy.akimov at gmail.com
Tue Mar 18 05:32:53 EDT 2008


2008/3/17, Adam Langley <agl at imperialviolet.org>:
> On Mon, Mar 17, 2008 at 2:29 AM, Vitaliy Akimov
>
>
> The important point here is that the recvFrom calls in
>  Network.Socket[1] don't block.

Yes, this is the answer.  Network.Socket.socket calls
System.Posix.Internals.setNonBlockingFD to set socket non-blocking.
I'm on Windows, and this function is simply "return ()" for this
platform.
So that's why it doesn't work on Windows, I think I should find some
way to make a socket unblocking after its creation.

Thank you.
Vitaliy.


More information about the Haskell-Cafe mailing list