Subject: Re: Callback for channel data ready

Re: Callback for channel data ready

From: Tom Weber <tom.weber_at_cryptzone.com>
Date: Fri, 16 Mar 2012 12:24:39 +0100

On Fri, March 16, 2012 12:13, Tom Weber wrote:
>
> int libssh2_channel_direct_tcpip_sync(...)
> {
> int flags;
> int rc;
>
> libssh2_channel_direct_tcpip_async(...);
> do {
> poll(...);
> libssh2_session_process(..., &flags);
> } while (!(flags & LIBSSH2_REQUEST_COMPLETED));
>
> return libssh2_session_get_request_status(...);
> }
>

Before anyone points it out, yes that function should return a pointer to a
new channel. Or preferably store it through a destination pointer
(LIBSSH2_CHANNEL **) passed in as argument, so that we can get an error code
as return value.

-- 
Best regards,
Tom Weber
Cryptzone Group AB
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-03-16