[erlang-questions] gen_tcp:send timeout

Loïc Hoguin <>
Thu Nov 13 11:23:51 CET 2014


I believe Heroku is using the port directly so the send call does not 
block. The send call is synchronous, and they could not afford to wait 
so they went with an asynchronous solution.

On 11/13/2014 12:21 PM, Dmitry Kolesnikov wrote:
> My question is about best practice. If send_timeout exists at socket option why you need to use ports directly unless there is some undocumented  issues with send_timeout
>
> Best Regards,
> Dmitry >-|-|-(*>
>
>
>> On 13.11.2014, at 12.09, Holger Wei� <> wrote:
>>
>> * Dmitry Kolesnikov <> [2014-11-12 11:16]:
>>> I've not discovered yet the reason but my sender process is stacked at
>>> {current_function,{prim_inet,send,3}}
>>>
>>> The timeout will help me but I'am confused on the way to achieve it
>>>
>>> * gen_tcp provides an option {send_timeout, xxx}. The documentation says
>>>   "The fact that the send call does not accept a timeout option, is
>>>   because timeouts on send is handled through the socket option
>>>   send_timeout."
>>
>> I'm confused, too.  Is your process getting stuck in prim_inet:send/3
>> even though you specified this option?  Or is your question whether/how
>> to use it?
>>
>> Holger
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://erlang.org/mailman/listinfo/erlang-questions
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>

-- 
Loïc Hoguin
http://ninenines.eu


More information about the erlang-questions mailing list