aleph

mccraigmccraig 2019-07-15T05:22:50.032600Z

@runeb dyu mean you added a :timeout to the fast-echo-handler example s/connect ?

runeb 2019-07-15T20:37:40.035200Z

@mccraigmccraig yes, precisely. I think the response from @hiredman explains perfectly why I did not see what I initially expected (timeout when lack of incoming data). If timeout is meant to address the tcp layer it makes sense.

mccraigmccraig 2019-07-15T20:56:10.035600Z

manifold.stream/connect :timeout doesn't address the tcp layer... it's timing out a connection between streams, which in the case of the fast-echo-handler is a connection between the rx and tx sides of the tcp socket, but it's not a tcp layer timeout

runeb 2019-07-15T21:11:42.037500Z

@mccraigmccraig hmmm in my test case outlined originally (connecting to the handler by way of telnet). Should I expect to see a disconnect from said time out in case I dont touch the keyboard?

mccraigmccraig 2019-07-15T21:24:14.041200Z

no, i don't think so - the only thing being disconnected is the connection between the two streams based on the underlying socket channels - i don't think stream/connect :timeout closes its source or sink

mccraigmccraig 2019-07-15T21:24:48.042100Z

do you observe that it stops echoing after the timeout?

runeb 2019-07-15T21:41:54.047300Z

They dont close as far as i cant tell. I set the flags for closing also. I would like to see a disconnect on the telnet side. I need to kick clients that are not chatting for some set period and thought timeout was the answer. I made a watchdog to check "chattiness" of each connection and closing those that fail the timeout threshold. I am curious if this is the expected way of handling such conditions. I am not so sure what benefit I get from the current behavior of timeout? To set tcp socket timeout pr connection instead of on a system level? Do you know?

runeb 2019-07-15T21:42:36.047600Z

Hope I make sense 🙂

mccraigmccraig 2019-07-15T22:47:35.048500Z

can you show some code @runeb? easier to understand then...