[Twisted-Python] Conch channel blocked
jakamkon at gmail.com
Thu Feb 4 11:30:59 EST 2010
2010/2/4 james bardin <jbardin at bu.edu>:
> On Thu, Feb 4, 2010 at 9:01 AM, <exarkun at twistedmatrix.com> wrote:
>> I can't run your example code, since it's not a complete example. That
>> makes it harder to point out what's wrong with it. However, one thing
>> does strike me as wrong:
>>> while chunk:
>>> chunk = f.read(4096)
>> This is a pattern you typically want to avoid, in Conch or anything else
>> Twisted-based. I don't know if SSHChannel is a consumer, but if not it
>> should be, and you should be writing the file using a producer. See:
> It looked awkward, but the one example in the documentation was my
> only starting point.
> This is only a slightly modified version of that example, which writes
> directly through the session channel, which makes sense in the
> ssh-protocol, but apparently not here.
> Thanks. I'll see if I can relate that into conch.
>>>Does anyone know if any projects making good use of twisted.conch,
>>>where I can see the source in action, and in depth?
>> Mantissa uses Twisted Conch a bit:
>> But you won't find any code sending any exec requests there.
> That's OK. any little bit helps.
> I have a twisted service, and it needs to tunnel some information
> through an ssh channel. Although this would take me a couple minutes
> with another library, I feel I should be able to make use of what's
> already built in to twisted, and not add another dependency.
Maybe you can use connection forwarding in conch? Have a look at
to see how the forwarding API works.
More information about the Twisted-Python