-
Notifications
You must be signed in to change notification settings - Fork 2
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
will method read_stream block? #1
Comments
Hi @yangshoulai, thanks for the question. If I understand correctly, you’re asking about this bit of code ssh-test/async-ssh2-lite/src/main.rs Lines 47 to 58 in 64210f7
No, the method will not block in the next loop. The method read_buf_bytes() checks how many bytes (n) were read from the stream. If As such, the function will run through the loop until it reads the entire stream and once that's done, the next |
Thank you very much for your detailed explanation. I have learned a lot. Finally, I found this lib ssh_jumper, It helped me solved my problem, but thanks again for your help. |
May I ask how "ssh_jumper" is used together with async ssh2 lite? |
Hi @TheBlindM I think that ssh_jumper uses async ssh2 lite under the hood |
In async-ssh2-lite/src/main.js line 49, if the read stream size exactly equal BUFFER_SIZE, method read_buf_bytes will return true, will current method block in next loop? I am a newer to Rust and I am searching for ssh local port forwarding, Thank you very much if you could answer my question。
The text was updated successfully, but these errors were encountered: