Subject: Detecting broken connection

Detecting broken connection

From: Alexander Lamaison <>
Date: Mon, 12 Jul 2010 01:53:36 +0100

I keep a pool of connections open long-term. Recently I've been using
them on wifi and realised that i don't handle broken sockets. What's
the best way to do this so that I can resurrect stale sessions as
needed? I want to test the connection somehow before issuing other
'commands' e.g. libssh2_sftp_open_ex. Currently these return some
arbitrary failure (such as "Unable to send FXP_OPEN*" which I can't
distinguish from other general errors making ti hard to know when to
resurrect the session and when to report a failure.

Any advice is very welcome :)


Swish - Easy SFTP for Windows:
Received on 2010-07-12