Subject: [libssh2] SFTP Blocking Reads and Writes

[libssh2] SFTP Blocking Reads and Writes

From: Lucas Newman <lucas_at_delicious-monster.com>
Date: Sun, 25 Feb 2007 18:56:15 -0800

I've noticed that the new sftp_readnb and sftp_writenb functions don't
ever seem to block. I profiled the libssh2_sftp_nonblock sample and I
am seeing half of the time still spent blocking, even when doing the
largest reads possible.

Looking through the code, I think the reason is because
_libssh2_sftp_read, the internal function for reading, calls
libssh2_sftp_packet_requirev to acquire the data packet, which in turn
calls libssh2_sftp_packet_read in blocking mode. This means that the
entire data packet will be read in blocking mode, which is the
behavior I am observing.

Is this the correct assessment, or am I crazy?

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2007-02-26