Subject: Re: Callback for channel data ready

Re: Callback for channel data ready

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 15 Mar 2012 10:54:37 +0100 (CET)

On Thu, 15 Mar 2012, Tom Weber wrote:

> I would probably have designed the API so that the app explicitly reads
> socket data with libssh2_transport_read(), wrapped in
> libssh2_session_read(), and libssh2_channel_read() would only operate on
> that data, it wouldn't call libssh2_transport_read() itself. But I guess
> it's too late to make such a change.

It is never too late! We can "easily" add a function today that just reads
everything off the socket, and then you can use the existing
libssh2_channel_read() function just fine (when this API "mode" is used, we
would prevent the channel read functions to try reading anything from the
transport). We could also add a function that can return exactly which
channels that have data pending.

Or am I missing something?

-- 
  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-03-15