I have a node tls client. It's started as:
var cleartextStream = tls.connect(port, server, {}, function() {do some stuff});
I need to set a socket activity timeout. I imagine that I could do some application layer thing like setTimeout(streamTimeout, 30000) and reset it every time clearTextStream.on('data' gets activated but I'd like to use native node facilities wherever possible.
Is there a way to set a timeout on the underlying socket below the clear text or encrypted streams?