[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: polling for incoming stdout and stderr


Hi John,

The best I could advise you to use is the channel callback API. You
can't ask it to ignore events on stdout/stderr, but you can choose to
ignore them in your callback.
An exemple of use of that callback api for flow controle can be found in
this development code here:
https://git.libssh.org/users/aris/libssh.git/tree/src/connector.c?h=connector#n291

Aris

Le 22/07/15 17:00, John Marshall a écrit :
> Hi,
>
> I am a newcomer to libssh and am not clear on how I to do something.
>
> The goal is to provide flow control on the client side for dealing
> with incoming
> data for stdout, for stderr coming over a channel. For my use case, I
> need to
> call poll myself, so the ssh poll and select functions won't be an
> option. I would
> like to avoid having to poll on an fd for read and then have to check
> if the data
> is for stdout or stderr. This would be wasteful if I am only
> interested in one of
> them and it is the other that has data ready to be read.
>
> I'd be happy to look over sample code or be directed to the
> appropriate docs,
> function calls.
>
> Thanks,
> John
>



References:
polling for incoming stdout and stderrJohn Marshall <John.Marshall@xxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org