Subject: Re: [libssh2] Non-blocking vs. default mode

Re: [libssh2] Non-blocking vs. default mode

From: James Housley <jim_at_thehousleys.net>
Date: Sun, 22 Apr 2007 18:24:51 -0400

On Apr 22, 2007, at 5:52 PM, Daniel Stenberg wrote:

> On Sun, 22 Apr 2007, James Housley wrote:
>
>> I think maybe we should remove the *nb() functions and make the
>> old names just work. I would also like to keep old programs
>> working in all cases, as long as they didn't set non-blocking to
>> true (since we know that didn't work). But before proceeding I
>> would like to wait a while, April 29th, to allow others a chance
>> to chime in.
>
> We would then need to modify the prototypes for several of the old
> functions as the non-blocking ones need to be able to return
> *_EAGAIN and there is a bunch of functions in the 0.14 API that
> don't easily allow that without modifications.
>
> A few examples: libssh2_session_init_ex, libssh2_sftp_open_ex,
> libssh2_sftp_init, ... Basically all that operations on sockets
> that return a struct/handle.

Those I am thinking about, but currently they return NULL on error.
So if we used the error codes these could work with minimal changes.

>
> So while this makes a bigger impact on existing applications, I'm
> still leaning towards this being the better idea, to minimize the
> amount of function entries and code.

Jim

--
/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
  X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
jeh@FreeBSD.org      http://www.FreeBSD.org     The Power to Serve
jim@TheHousleys.Net  http://www.TheHousleys.net
---------------------------------------------------------------------
In theory there is no difference between theory and practice.
In practice there is no similarity.
       -- From the "I wish I'd said that" archives.
-------------------------------------------------------------------------
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_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2007-04-23