Subject: Re: libssh2_poll()

Re: libssh2_poll()

From: Thomas Stover <>
Date: Fri, 18 Jun 2010 08:38:34 -0500

On Fri, 18 Jun 2010 08:34:46 +0200, Peter Stuge <> wrote:
> Please STOP replying to messages when you want to create a new
> thread. This causes problems for search engines and humans who use
> threading as a means to organize related messages as a whole
> discussion in their email software. When you are creating a new topic
> make sure to send a new email, or at the very least make sure that
> you remove any RFC822 headers in your message that link it to
> previous posts. (This is not possible in many email programs, so the
> safe method is to always send a new email when starting a new topic!)

Man, I apologize. I had no idea that anything about smtp based email was
"reply aware" other than placing the "re:" before subject lines.

> Yes, and you must be using non-blocking. This is a known deficiency
> in the libssh2 API that is being worked on.

In my use case the non-blocking model is wonderful. I was just trying to
figure some things out by looking at the examples, some of which use the
libssh2_poll() function.

On Fri, 18 Jun 2010 09:10:51 +0200 (CEST), Daniel Stenberg
> On Fri, 18 Jun 2010, Peter Stuge wrote:
>>> What if there are no channels?
>> Then there won't be much data. This case isn't covered at all by the
>> current
>> API. It's an important point to keep in mind for the future
> Indeed. My suggested approach with a single function
> "libssh2_session_pump"
> (name yet to be decided) that basically gets everything from the socket
> will
> fix this flaw.

Having a session with no channels is not something I intend to do. The
question was just to help me conceptualize the way things work, and your
answers helped me allot.

A "libssh2_session_pump" would also be corollary to concepts like keep
alive ( (just discovered wiki btw)

Received on 2010-06-18