Re: Check if host is available
- Subject: Re: Check if host is available
- From: Andreas Schneider <asn@xxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Wed, 03 Aug 2011 14:02:05 +0200
- To: libssh@xxxxxxxxxx
On Wednesday 03 August 2011 13:42:01 you wrote:
> if I try to connect to a host via ssh_connect() and the host isn't
> available the function blocks.
did you set a timeout?
> Is there a way to check if the host is available without blocking the
> whole program?
Sure, you can handle the connection completely on your own and give libssh
just a working file descriptor (socket).
Andreas Schneider GPG-ID: F33E3FC6
Archive administrator: firstname.lastname@example.org