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

sftp_write hangs


Hello,

I have build a sftp client that downloads and uploads files from
OpenSSH for Windows server.

I have tried to download more than 10mb files, and when I traced the
function calls, it will run through sftp_write and the program will
get back the focus, but the downloading of file will not start.

Here is a sample code:
flWrite = sftp_open(sftp, strRemoteFilePath, O_WRONLY | O_CREAT |
O_TRUNC, 0700);

nSizeRead = oLocalFile.Read(data, nFileSize);
nSizeWrite = sftp_write(flWrite, data, nSizeRead);

oLocalFile.Close();
sftp_close(flWrite);	


Am i coding it right? meaning should i write it multiple times in
smaller bytes rather than 1 big write?

Thank you for your time.

Follow-Ups:
Re: sftp_write hangsAndreas Schneider <asn@xxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org