[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Check if host is available
[Thread Prev] | [Thread Next]
- Subject: Re: Check if host is available
- From: Thomas Mayer <tm.telemotive@xxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Wed, 03 Aug 2011 14:47:07 +0200
- To: libssh@xxxxxxxxxx
Hi Andreas,
On Wednesday 03 August 2011 13:42:01 you wrote:Hi,Hi,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?
No, thanks for the advice!
This could be the solution for my next problem. I want to detect if someone for example unplugged the network cable while a ssh session is running.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
Regards, Thomas
Re: Check if host is available | "Oliver Stöneberg" <oliverst@xxxxxxxxx> |
Check if host is available | Thomas Mayer <tm.telemotive@xxxxxx> |
Re: Check if host is available | Andreas Schneider <asn@xxxxxxxxxxxxxx> |