summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-04-16 06:35:41 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-04-16 06:35:41 -0700
commit51af17813c875fa7a3d9c4aeb45a82f52d0c72f0 (patch)
tree718c7b71e14f7ae4720761c1e899bfde30d0e135
parenta9299da438d46958603801ed48d6fe1f637b69ee (diff)
downloadtxr-51af17813c875fa7a3d9c4aeb45a82f52d0c72f0.tar.gz
txr-51af17813c875fa7a3d9c4aeb45a82f52d0c72f0.tar.bz2
txr-51af17813c875fa7a3d9c4aeb45a82f52d0c72f0.zip
Improve sock-peer documentation.
* txr.1: Remove factually incorrect statements that only sockets connected with sock-connect or sock-accept have a peer address. Broadly revise wording.
-rw-r--r--txr.139
1 files changed, 20 insertions, 19 deletions
diff --git a/txr.1 b/txr.1
index d5b29fcd..8e411d0b 100644
--- a/txr.1
+++ b/txr.1
@@ -38630,30 +38630,31 @@ is thrown for other stream types.
.mets (set (sock-peer << socket ) << address )
.syne
.desc
-If
-.meta socket
-is a socket stream connected to a remote peer,
-this function returns the socket address representing
-the remote peer. The return value is one of the concrete
-structure types derived from the
-.code sockaddr
-base, the choice depending on the socket's address family.
+The
+.code sock-peer
+function retrieves the peer address
+has most recently been assigned to
+.metn socket .
-If
-.meta socket
-is a file or process stream, or a socket without a connected
-peer, then the function returns
+Sockets which are not connected initially
+have a peer address value of
.codn nil .
+A socket which is connected to a remote peer
+receives that peer's address as its
+.codn sock-peer .
-For any other stream type, the function throws an error of type
-.codn type-error .
-
-A socket is connected to a remote peer if the
+If a socket is connected to a remote peer via
+a successful use of the
.code sock-connect
-function was successfully applied to it, or if the
-socket was produced as the return value of the
+function, then its
+.code sock-peer
+address is set to match that of the peer.
+
+Sockets returned by the
.code sock-accept
-function. No other socket stream has a peer.
+function are connected, and have the remote endpoint address as their
+.code sock-peer
+address.
Assigning an address to a
.code sock-peer