diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2012-03-23 18:24:47 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2012-03-23 18:24:47 +0100 |
commit | 9972cce777852c59c4ba3226d52cec83565b1dd9 (patch) | |
tree | ca8e8e67885269a9610fe2eb7d8b508b33a6cfea /doc/en | |
parent | 4474f9ca0e7d0eca0edfeae6310594b2436a1b03 (diff) | |
download | weechat-9972cce777852c59c4ba3226d52cec83565b1dd9.zip |
core: add a connection timeout for child process in hook_connect (bug #35966)
Diffstat (limited to 'doc/en')
-rw-r--r-- | doc/en/autogen/user/weechat_options.txt | 5 | ||||
-rw-r--r-- | doc/en/weechat_plugin_api.en.txt | 6 | ||||
-rw-r--r-- | doc/en/weechat_scripting.en.txt | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/doc/en/autogen/user/weechat_options.txt b/doc/en/autogen/user/weechat_options.txt index 11c2d3b7d..ccc52e773 100644 --- a/doc/en/autogen/user/weechat_options.txt +++ b/doc/en/autogen/user/weechat_options.txt @@ -723,6 +723,11 @@ ** type: string ** values: any string (default value: `"%a, %d %b %Y %T"`) +* [[option_weechat.network.connection_timeout]] *weechat.network.connection_timeout* +** description: `timeout (in seconds) for connection to a remote host (made in a child process)` +** type: integer +** values: 1 .. 2147483647 (default value: `60`) + * [[option_weechat.network.gnutls_ca_file]] *weechat.network.gnutls_ca_file* ** description: `file containing the certificate authorities ("%h" will be replaced by WeeChat home, "~/.weechat" by default)` ** type: string diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt index c90fdf16c..f1f09a5f4 100644 --- a/doc/en/weechat_plugin_api.en.txt +++ b/doc/en/weechat_plugin_api.en.txt @@ -7090,6 +7090,7 @@ Arguments: *** 'WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR': GnuTLS init error *** 'WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR': GnuTLS handshake error *** 'WEECHAT_HOOK_CONNECT_MEMORY_ERROR': insufficient memory +*** 'WEECHAT_HOOK_CONNECT_TIMEOUT': timeout ** 'gnutls_rc': result value of 'gnutls_handshake()' ** 'const char *error': result value of 'gnutls_strerror(gnutls_rc)' ** 'const char *ip_address': IP address found @@ -7139,6 +7140,9 @@ my_connect_cb (void *data, int status, int gnutls_rc, const char *error, case WEECHAT_HOOK_CONNECT_MEMORY_ERROR: /* ... */ break; + case WEECHAT_HOOK_CONNECT_TIMEOUT: + /* ... */ + break; } return WEECHAT_RC_OK; } @@ -7179,6 +7183,8 @@ def my_connect_cb(data, status, gnutls_rc, error, ip_address): # ... elif status == WEECHAT_HOOK_CONNECT_MEMORY_ERROR: # ... + elif status == WEECHAT_HOOK_CONNECT_TIMEOUT: + # ... return weechat.WEECHAT_RC_OK hook = weechat.hook_connect("", "my.server.org", 1234, sock, 0, "", diff --git a/doc/en/weechat_scripting.en.txt b/doc/en/weechat_scripting.en.txt index 880732b8d..83466b437 100644 --- a/doc/en/weechat_scripting.en.txt +++ b/doc/en/weechat_scripting.en.txt @@ -385,7 +385,7 @@ List of constants in script API: WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND, WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED, WEECHAT_HOOK_CONNECT_PROXY_ERROR, WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR, WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR, WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR, - WEECHAT_HOOK_CONNECT_MEMORY_ERROR + WEECHAT_HOOK_CONNECT_MEMORY_ERROR, WEECHAT_HOOK_CONNECT_TIMEOUT | hook signal | WEECHAT_HOOK_SIGNAL_STRING, WEECHAT_HOOK_SIGNAL_INT, WEECHAT_HOOK_SIGNAL_POINTER |======================================== |