mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-06 10:27:22 +09:00
session: Introduce SSH_TIMEOUT_DEFAULT
The default timeout of 30seconds is very nice when connecting to a new SSH session, however it completely breaks the synchronous blocking API. Use SSH_TIMEOUT_DEFAULT when in blocking mode so channel reads&write are blocking as expected Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
6bc64c368d
commit
66b37c856c
@@ -69,8 +69,13 @@ enum ssh_pending_call_e {
|
||||
#define SSH_SESSION_FLAG_AUTHENTICATED 2
|
||||
|
||||
/* codes to use with ssh_handle_packets*() */
|
||||
/* Infinite timeout */
|
||||
#define SSH_TIMEOUT_INFINITE -1
|
||||
/* Use the timeout defined by user if any. Mostly used with new connections */
|
||||
#define SSH_TIMEOUT_USER -2
|
||||
/* Use the default timeout, depending on ssh_is_blocking() */
|
||||
#define SSH_TIMEOUT_DEFAULT -3
|
||||
/* Don't block at all */
|
||||
#define SSH_TIMEOUT_NONBLOCKING 0
|
||||
|
||||
/* members that are common to ssh_session and ssh_bind */
|
||||
|
||||
Reference in New Issue
Block a user