summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2023-05-08 11:14:18 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2023-05-08 11:14:18 +0900
commit9110945ce625e4a668eeed6a00252b7851e6d4b6 (patch)
tree2a3ba2b94fff96470adcde04e67099dc0fea9c68 /doc
parent3d8195ebc5e3f48c004b3a7ec473e66166c58fe7 (diff)
downloadlibassuan-9110945ce625e4a668eeed6a00252b7851e6d4b6.tar.gz
Implement timeout in assuan_sock_connect_byname.
* src/assuan-socket.c (socks5_connect): Add new argument TIMEOUT in milliseconds. (_assuan_sock_connect): Follow the change. (_assuan_sock_connect_byname): Fourth argument is now TIMEOUT. (assuan_sock_connect_byname): Likewise. -- GnuPG-bug-id: 3302 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/assuan.texi17
1 files changed, 10 insertions, 7 deletions
diff --git a/doc/assuan.texi b/doc/assuan.texi
index 7ecf544..111e6e3 100644
--- a/doc/assuan.texi
+++ b/doc/assuan.texi
@@ -1997,7 +1997,7 @@ details on the redirection file format.
@deftypefun int assuan_sock_connect_byname (@w{const char * @var{host}}, @
@w{unsigned short @var{port}}, @
- @w{int @var{reserved}}, @
+ @w{int @var{timeout}}, @
@w{const char *@var{credentials}}, @
@w{unsigned int @var{flags}})
@@ -2007,12 +2007,15 @@ current implementation requires that @var{flags} has either
new TCP STREAM socket is returned; on error @code{ASSUAN_INVALID_FD}
and ERRNO set. If @var{credentials} is not @code{NULL}, it is a
string used for password based SOCKS authentication. Username and
-password are separated by a colon. @var{reserved} should be 0. To
-test whether the proxy is available @var{host} and @var{port} may be
-given as NULL/0: If the proxy is available the function returns a
-valid socket which is in the state after credentials sub-negotiation.
-The caller now knows that the SOCKS proxy is available and has been
-authenticated; normally the caller closes the socket then.
+password are separated by a colon. @var{timeout} specifies timeout
+value (in miliseconds) for the connection. @var{timeout} with zero
+means no timeout (for client side, the SOCKS server may timeout).
+@var{timeout} with -1 means no wait. To test whether the proxy is
+available @var{host} and @var{port} may be given as NULL/0: If the
+proxy is available the function returns a valid socket which is in the
+state after credentials sub-negotiation. The caller now knows that
+the SOCKS proxy is available and has been authenticated; normally the
+caller closes the socket then.
@end deftypefun