On Mon, Mar 24, 2025 at 1:15 PM James Wrigley <ja...@puiterwijk.org> wrote:
> Do you have an idea of how difficult it would be to extend the SFTP API to 
> work in non-blocking mode as well?

We are trying to make the new APIs (such as the SFTP AIO) in a way
that it should be ready to work in async mode. But as far as I know,
all the old ones will have to be rewritten. Some functions might need
just internal changes (the simple one returning int/ssize_t, for
example sftp_fsync()), but others will likely need a new API as they
return now an object (such as sftp_new()), where it is not possible to
return SSH_AGAIN while waiting for the response.

We have a abandoned draft for the change of sftp_new() and sftp_init()
to work with non-blocking mode here:

https://gitlab.com/libssh/libssh-mirror/-/merge_requests/404/

Jakub


Reply via email to