Subject: send/recv callbacks (was Re: writing to channel limited to 2 Mb?)

send/recv callbacks (was Re: writing to channel limited to 2 Mb?)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 11 Aug 2011 11:43:55 +0200 (CEST)

On Thu, 11 Aug 2011, Przemysław Szczygielski wrote:

> Indeed? Well, they are there in libqxt
> src\3rdparty\libssh2\libssh2_rw_callbacks.patch
>
> I am not connected to libqxt anyway, but I can send you the file if you
> want.

No need to, we can find it here:
http://dev.libqxt.org/libqxt/src/67c3ebd625f2/src/3rdparty/libssh2/libssh2_rw_callbacks.patch

I can see how we can add support for user-provided send/recv functions and I
believe we've discussed that before and I'm for it. I would however prefer to
better hide that within the _libssh2_recv() and _libssh2_send() functions to
make the existing code (basically) unmodified and easier to read, make it
easier to have future code use the same concept and make it affect _all_
reads/writes.

The above mentioned patch fails at some of that.

To make that work, we'll have to change _libssh2_recv() and _libssh2_send() to
take a session pointer instead of the socket as the first argument, but that
shouldn't be too hard.

-- 
  / daniel.haxx.se

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-08-11