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

Re: Issue #74 from release 0.7 roadmap.

On Thursday 26 June 2014 17:18:50 Joseph Southwell wrote:
> I need this feature myself so would like to contribute it.

Sorry for the late response, I was on vacation.

This is really great. We should rewrite the async sftp read too so it matches 
the write function. The current API isn't really nice.

> Before I begin
> working on it. I want to make sure that I am doing it in a way that will
> fit with your grand design.
> I was planning on adding a channel write callback that gets passed how many
> bytes were written and an error indicator. I would also add an associated
> ssh_channel_write_nonblocking function.
> Then using that underlying functionality I will add the following 2
> functions. sftp_async_write_begin .. initiate a non blocking write. Retuns
> a request id sftp_async_write_end .. takes a request id and returns
> ssize_t, number of byes written < 0 on error

I think I would prefer to have.

ssize_t sftp_async_write_send(sftp_file file, void *data, size_t len)


and also


I think a

ssh_channel_async_writev(ssh_channel c, const struct iovec *iov, size_t count)

would be nice for this. See 'man writev'. We have async writev function in 
Samba and use this function most of the time.

	-- andreas

Andreas Schneider                   GPG-ID: CC014E3D
www.cryptomilk.org                asn@xxxxxxxxxxxxxx

Issue #74 from release 0.7 roadmap.Joseph Southwell <joseph@xxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org