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

behavior in non-blocking


Hi,
 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
code.

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:
http://api.libssh.org/stable/group__libssh__session.html#ga2a29cff08855
611be84d050e5bec73bc
but I don't see how one could determine the direction that made the
call to return SSH_AGAIN.

By seeing:
https://www.libssh.org/archive/libssh/2014-08/0000001.html
I get the impression that libssh may only return SSH_AGAIN on read,
however, that's not documented in the tutorial or individual function
reference.

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?

regards,
Nikos

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






Follow-Ups:
Re: behavior in non-blockingNikolay <nitro@xxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org