xtaci / smux

A Stream Multiplexing Library for golang with least memory usage(TDMA)
MIT License
1.31k stars 196 forks source link

proposal: add option to not close idle session #84

Open apmattil opened 3 years ago

apmattil commented 3 years ago

I'm making proxy and have tcp connections that are just opened but no data is sent. If I enable keepalive, session is closed after 30 sec.

Could you add option not to close session if it has streams open ? not just data passed. I do like to detect if connection is broken when keepalive's do not get reply.

I know this could be done at my proxy as well but implementing it to smux would make things much simpler.

xtaci commented 3 years ago

Config.KeepAliveDisabled just do the job