summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-03-15 06:26:08 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-03-15 06:26:08 -0700
commit39c99e7d178dd6a05b2b81a26308c92ca423983d (patch)
tree61218616dcc3bd2dcd9f3e6f013ce3de7768f116 /txr.1
parent2aff577f5cffcf0cf3ca31b939443fad4b304977 (diff)
downloadtxr-39c99e7d178dd6a05b2b81a26308c92ca423983d.tar.gz
txr-39c99e7d178dd6a05b2b81a26308c92ca423983d.tar.bz2
txr-39c99e7d178dd6a05b2b81a26308c92ca423983d.zip
Make connect interruptible and support timeout.
* socket.c (to_connect): New static function. (sock_connect): Use to_connect instead of calling connect directly. (lock_load_init): sock-connect intrinsic registration updated to three arguments, one optional. * txr.1: Documented sock-connect timeout.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.111
1 files changed, 10 insertions, 1 deletions
diff --git a/txr.1 b/txr.1
index de3b5103..b0d26891 100644
--- a/txr.1
+++ b/txr.1
@@ -37857,7 +37857,7 @@ struct is maintained by \*(TX.
.coNP Function @ sock-connect
.synb
-.mets (sock-connect < socket << address )
+.mets (sock-connect < socket < address <> [ timeout-usec ])
.syne
.desc
The
@@ -37875,6 +37875,15 @@ If the operation fails, an exception of type
is thrown. Otherwise, the function returns
.metn socket .
+If the
+.meta timeout-usec
+argument is specified, it must be a fixnum integer.
+It denotes a connection timeout period in microseconds.
+If the connection doesn't succeed within the specified timeout,
+an exception of type
+.code timeout-error
+is thrown.
+
.coNP Function @ sock-bind
.synb
.mets (sock-bind < socket << address )