www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Re: Responding to the server's keepalives

Re: Responding to the server's keepalives

From: Alexander Lamaison <swish_at_lammy.co.uk>
Date: Thu, 2 Aug 2012 23:54:56 +0100

On 2 August 2012 23:44, Peter Stuge <peter_at_stuge.se> wrote:
> Alexander Lamaison wrote:
>> What's the non-deprecated way to do the same?
>
> I think there is none.
>
> Please suggest something? :)

My immediate suggestion would be a new api (libssh2_session_pump?)
that just runs _transport_read() until there's nothing left to read.
My assumption is that any useful packets we might need later get
processed and queued in the buffers while other packets (_DEBUG,
_IGNORE) are discarded and _GLOBAL_REQUEST, used for keepalive, is
responded to if a response was requested. Then you do your own
select/poll/etc. so you know when to call the function.

But I'm not very familiar with the transport layer so I may be
misunderstanding what happens to the packets.

Also, the client would have to take care to stop the polling and
pumping if they are using an API call. ... I think.

-- 
Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-08-03

the libssh2 team