>> Ok thanks, I'm trying to understand this to see what can be >> done about this to >> improve libssh2 performance. >> >> What requests do libssh2 send that it waits for a response >> to that the openssh >> tools don't? I'm looking at the code for a simple SCP >> download case, and I >> don't see it. >> >> Can you be a bit more specific and mention exact protocol >> details or perhaps >> libssh2 source code functions/snippets that is the culprit >> of this mentioned >> restriction?
The most critical part is file transfer. Consider that you are transferring a 2MB file, you send one request (libssh2_sftp_read, SSH_FXP_READ) for 32kb of data. Then you wait for the response packet (libssh2_sftp_packet_requirev, SSH_FXP_DATA, SSH_FXP_STATUS). Then you send the request again and wait a while to get the response. And so on. If the first request is successfull you could send three requests in a row and then wait for the responses and data. If they are successfull, then let's send 10 requests and wait for responses. This would consume the bandwidth more efficiently as the bandwidth would be in use while the server processes our request. This is what I mean with asynchronous transfer. This could be implemented by adding a full function that gets/puts one file similarly to command line tools. Now that the API provides read/write functions to get a certain amount of data we are bound to use synchronous approach. Hopefully this makes sense :-) /jUSSi -- perl -e '@_=qw{Just Perl Another Hacker}; sub [EMAIL PROTECTED] print keys %{&r}; print values %{&r};' ____________________________________________________________________________________ Comptel Finland is moving to new premises. Starting from July 9 our new visiting address is Salmisaarenaukio 1, 00180 Helsinki, and the postal address is P.O.Box 1000, FI-00181 Helsinki ____________________________________________________________________________________ Disclaimer: This message and any attachments thereto are intended solely for the addressed recipient(s) and may contain confidential information. If you are not the intended recipient, please notify the sender by reply e-mail and delete the e-mail (including any attachments thereto) without producing, distributing or retaining any copies thereof. Any review, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient(s) is prohibited. Thank you. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ libssh2-devel mailing list libssh2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libssh2-devel