On Nov 4, 2009, at 4:42 PM, Adam Kocoloski wrote:

I don't know what the behavior is when there are 0 bytes available on the socket -- does gen_tcp:recv just keep returning 0 and leave it to us to implement the timeout, or can we do something like

gen_tcp:recv(Socket, 0, 10000)

Best, Adam

Ok, confirmed -- this call blocks for 10 seconds when no data is available on the socket. I think that's the behavior we're looking for: detect stale connections, but let slow connections keep working. Not sure what the greater performance implications of switching this configuration might be, though (the chunks of data we'd be dealing with would be much smaller). Best,

Adam

Reply via email to