Skip to content

Pull socket inside of transport #6

Description

@kousu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions