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

Re: behavior in non-blocking

Hi, Nikos.

Unfortunately, libssh is not completely non-blocking. It only has non-blocking mode for a set of calls.

But if you're interested in directions, you could look for ssh_get_poll_flags() function:


It returns a set of flags like SSH_READ_PENDING and/or SSH_WRITE_PENDING.

Best regards, Nikolay Karikh.

31.10.2017 09:51, Nikos Mavrogiannopoulos wrote:
  I have send a pull request to curl [0] to use libssh as an SCP back-
end, however there is an open issue with non-blocking mode on the new

libssh2 supports non-blocking mode on read and writes, and provides a
function for the caller to determine whether it should wait on the
descriptor for reading or writing. I see that libssh provides a wait to
set the session to non-blocking mode:
but I don't see how one could determine the direction that made the
call to return SSH_AGAIN.

By seeing:
I get the impression that libssh may only return SSH_AGAIN on read,
however, that's not documented in the tutorial or individual function

Am I correct in making the assumption that libssh only returns
SSH_AGAIN on read? If not, is there some way I could obtain the
direction of the block?


[0]. https://github.com/curl/curl/pull/2036

Attachment: smime.p7s
Description: Криптографическая подпись S/MIME

Re: behavior in non-blockingNikos Mavrogiannopoulos <nmav@xxxxxxxxxx>
behavior in non-blockingNikos Mavrogiannopoulos <nmav@xxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org