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

Re: tutorial/example sftp in non blocking mode


Hi.
The naming is hard. The sftp_async_read was mostly PoC API, but not to
support non-blocking operation, but asynchronous file transfer (that
means having several in-flight requests instead of busily waiting for
the first one to arrive). This was deprecated in favor of the
sftp_aio_* API as described in the tutorial, which should be available
in the next release due in coming months so if you have some feedback,
it would be hugely appreciated:

https://api.libssh.org/master/libssh_tutor_sftp_aio.html

As already mentioned, the nonblocking operation of SFTP is still not
supported. As far as I can see, it would need to rewrite all of the
sftp functions to support returning SSH_AGAIN instead of waiting,
possibly with some API changes as some of the functions do not return
status, but just the allocated objects.

Jakub

On Tue, May 14, 2024 at 12:50 AM <reid.thompson@xxxxxxxxxxxxxxx> wrote:
>
> On Mon, 2024-05-13 at 18:15 -0400, reid.thompson@xxxxxxxxxxxxxxx wrote:
> > On Mon, 2024-05-13 at 11:50 -0700, Norm Green wrote:
> > > sftp is broken in nonblocking mode. Only ssh works.
> > >
> > > See: https://gitlab.com/libssh/libssh-mirror/-/issues/58
> > >
> > > Norm Green
> > >
> > >
> > Thanks,
> >
> > so at this time, sftp is blocking only?
> >
> > And it looks like sftp_async_read* have been deprecated.
>
> So, I want to follow up on this, it appears that sftp_async_read* have been
> marked as deprecated, but the sftp tutorial still has a section describing
> non-blocking asynchronous reading via this mechanism.
> Is this method broken, or just deprecated in anticipation of a better
> implementation in the future?
>
> >
> > Looks like there may be work going on in master to support non-
> > blocking?
> >
> > Reid
>
>
>


References:
tutorial/example sftp in non blocking modeReid Thompson <reid.thompson@xxxxxxxxxxxxxxx>
Re: tutorial/example sftp in non blocking modeNorm Green <norm.green@xxxxxxxxxxxxxxxxxx>
Re: tutorial/example sftp in non blocking modereid.thompson@xxxxxxxxxxxxxxx
Re: tutorial/example sftp in non blocking modereid.thompson@xxxxxxxxxxxxxxx
Archive administrator: postmaster@lists.cynapses.org