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

Pull socket inside of transport #6

Open
kousu opened this issue Sep 23, 2014 · 1 comment
Open

Pull socket inside of transport #6

kousu opened this issue Sep 23, 2014 · 1 comment

Comments

@kousu
Copy link
Contributor

kousu commented Sep 23, 2014

This is a feature request.

I find it awkward that I need to create my real transport (cough_WebSockets_cough) outside of paramikojs and pass in a writeCallback to do writes and need to manually edit transport.fullBuffer to make reads work. Paramiko-python doesn't need this because it can use threads. However, in lieu of threads, setInterval() could be used on transport.run() to handle reads and instead of passing writeCallback, transport could be an base class with abstract read() and write() methods. This change would make it easier to integrate websockets as I would just write a subclass of transport.

I sort of like the idea of exposing the event processor (transport.run())--it fits nicely with my twisted/asyncio/SDL training--so I'm not entirely sold on secretly using setInterval()... but if original Paramiko does secret threads, maybe it's the quickest and most reliable choice.


Sort of relatedly, it's annoying that I need to poll (recv +WaitException ~= select(..., 0)) to get data out of a paramikojs shell session. I would rather set an event listener to be called when data comes in.

@mimecuvalo
Copy link
Owner

Indeed, great feedback and comments. I'll keep this in mind as the project moves forward.
(patches also welcome of course from anybody listening)

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