-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Implement Channel::into_io_parts() for AsyncRead and AsyncWrite data transfers. #181
Conversation
4a9f54d
to
c797274
Compare
Upon reviewing the design and some issues here and there, I figured the issue with splitting See 0692d2f. |
360a822
to
0692d2f
Compare
Appreciate your work and the direction is looking good on the first look. I'm away until mid next week but should be able to properly review after that ✌️ |
Thanks for your quick response, have a great week until then 🎉 |
6ca4556
to
0f40451
Compare
Just checked it and everything looks good except a few nitpicks on the API.
P.S. can you please also add tests to cover the new code, and also replace the now half-obsolete |
Hi,
For sure, however I'm unsure about how to create such test, could it work with an integration test with a client and a server sending data to each other within a Thanks ! |
0326414
to
44d0500
Compare
…ead_authenticated() method
26f58bd
to
b06f23e
Compare
b06f23e
to
1de464f
Compare
Kinda related topic, but is there a reason to take |
It's done 🎉, about my proposition to remove the Once this is sorted the last thing to do will be the tests :) |
I think we should keep the |
I have some troubles sorting the |
I don't have a channel but I guess we can just discuss it in this thread :) I see two options:
|
Okay, I wasn't sure if it was okay to flood here.
The other way this could be done would be with the help of |
I'm not really fond of the |
9c60f82
to
fe39aaf
Compare
fe39aaf
to
e08038d
Compare
I ended up creating an |
Other thing, I feel like the |
@nuRRL it's due to there being two different |
Ah yes, that makes sense, that means we could split I'll look into it for a further PR. |
7c6b01c
to
c76f10b
Compare
Hi again, I fixed some flushing issues and added an end-to-end test for the data streaming from client to server and back. |
LGTM! @all-contributors please add @nuRRL for code |
I've put up a pull request to add @nuRRL! 🎉 |
@nuRRL could you please also make |
Hi there, just came back from week-end, sure for ChannelStream, even pub(super) works, about ChannelRx and ChannelTx, isn't it better to even hide them via a |
Agreed! |
Hi,
as mentioned in #162, I wanted to contribute to this crate by adding an easy way to pipe a
tokio::process::Command
I/O to a SSH Channel.This PR introduces a few changes:
ChannelTx
, implementingAsyncWrite
ChannelRx
, implementingAsyncRead
Channel
struct:This implementation allows to Drop either of the structs independently and regain access to the
Channel
struct when dropping theRx
side.channels
module to house the original code as well as my newio
module.It optionally includes an auto-close mechanism for the SSH Channels, it improves a bit the handling of: Edit: Reverted due to breaking-change and failing a test.Channel
s but might be a breaking changeCode snippet
Finally the usage of this is as such:
Thanks for reading,
Feel free to ask questions, or add suggestions :)