Subject: Re: [ libssh2-Bugs-2558794 ] libssh2_poll returns 0 sometimes when using select

Re: [ libssh2-Bugs-2558794 ] libssh2_poll returns 0 sometimes when using select

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 15 Apr 2009 16:36:19 +0200 (CEST)

On Wed, 15 Apr 2009, Heiner Steven wrote:

>> I'm now advocating we deprecate libssh2_poll() completely.
>>
>> Is there any reason why you don't just use poll() or select() on the socket
>> libssh2 operates on?
>
> According to the manual page libssh2_poll() seems to be just a
> platform-independant wrapper to poll(2)/select(2).

Right, and I don't think that's a job for libssh2.

> We could, however, add some additional value to that function: it could
> return whether a *complete SSH message* has been read or even if *SSH data*
> is available for libssh2_channel_read_ex().

Uhm, yes we could but why?

Such an application would rather just use non-blocking sockets, call poll()
and then call libssh2_channel_read_ex(). It's really simple already. Isn't it?

Besides, such fundamental change would be an ABI/API breakage so it would need
to be a new function anyway.

-- 
  / daniel.haxx.se
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2009-04-15