[erlang-questions] gen_tcp nonblocking send

Per Hedeland <>
Thu May 1 20:50:29 CEST 2008


Daniel Ginsburg <> wrote:
>
>On 01.05.2008 17:50 Valentin Micic wrote:
>
>> Does this mean that O_NDELAY is not supported in Erlang? Not even as an 
>> undocumented feature? ;-)
>> 
>
>Internally, sockets are non-blocking (see 
>erts/emulator/drivers/common/inet_drv.c), but as far as I understand, 
>gen_tcp and all the underlying libraries like prim_inet expose only 
>blocking send API to erlang processes.

And *you* don't really want non-blocking send (in the O_NDELAY sense)
anyway, but async send. Looking at prim_inet will tell you how to get
it, but I think in this case the "de-sync'ing" intermediate process is a
reasonable solution. Async accept is another story...

--Per



More information about the erlang-questions mailing list