Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can the server detect conn is closed? #7

Open
wangxiangyu opened this issue Jun 12, 2018 · 1 comment
Open

How can the server detect conn is closed? #7

wangxiangyu opened this issue Jun 12, 2018 · 1 comment

Comments

@wangxiangyu
Copy link

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 ~

@majgis
Copy link

majgis commented Jun 24, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants