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

Add Closed event to ShellStream. #1332

Merged
merged 2 commits into from
Feb 21, 2024

Conversation

scott-xu
Copy link
Collaborator

@scott-xu scott-xu commented Feb 21, 2024

Lib consumer could hook to this event to detect if channel is closed by server in time.
Closes #44

…event to detect if channel is closed by server **in time**.
@jscarle
Copy link
Contributor

jscarle commented Feb 21, 2024

Can you please link #44 in your description to close it with this PR?

@scott-xu
Copy link
Collaborator Author

scott-xu commented Feb 21, 2024

In our case, for some reason, the server may send channel close message to the client. As the client, we want to know this event in time and do some follow up work.
I checked the existing unit tests but no related cases found.

@scott-xu
Copy link
Collaborator Author

Can you please link #44 in your description to close it with this PR?

I should search first. Anyway I'm not alone. Thanks!

@scott-xu scott-xu marked this pull request as ready for review February 21, 2024 03:30
@scott-xu scott-xu mentioned this pull request Feb 21, 2024
@Rob-Hague
Copy link
Collaborator

What's the use case here?

Now that Read blocks until the channel is closed, can you just wait until Read returns 0?

@scott-xu
Copy link
Collaborator Author

What's the use case here?

Now that Read blocks until the channel is closed, can you just wait until Read returns 0?

We don't call Read. We use Write method and DataRecieved event.
You can check my previous comment for use case.

@WojciechNagorski
Copy link
Collaborator

I think we can merge this PR. Fits the current SSH.NET architecture.

@WojciechNagorski WojciechNagorski merged commit b3ec023 into sshnet:develop Feb 21, 2024
1 check passed
@scott-xu scott-xu deleted the shellstream-closed-event branch February 21, 2024 08:04
@WojciechNagorski WojciechNagorski added this to the 2024.0.0 milestone Feb 22, 2024
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

Successfully merging this pull request may close these issues.

Channel_Closed in ShellStream
4 participants