Open wangxiangyu opened 6 years ago
I'm in the same situation where I want to be notified when a connection is open/closed.
I'm gong to fork your telsh implementation and try adding the following two methods to the shellHandler:
shellHandler.RegisterConnectionOpen(producer Producer)
shellHandler.RegisterConnectionClosed(producer Producer)
Also, I'm thinking this issue should be combined with #6. On that issue, I'll elaborate on an experiment I already did with telnet.Context to identify unique connections in the standard command handlers.
I send stream output to stdout in shellHandler. So when the conn is closed, I need to terminate the handler function. So How can the server detect conn is closed?
Thank you ~