4dad76
From 1d9630e7857d6fbae6fddd261fbb80c9c9a8cfd6 Mon Sep 17 00:00:00 2001
4dad76
From: Tony Cook <tony@develop-help.com>
4dad76
Date: Mon, 18 Mar 2019 16:02:33 +1100
4dad76
Subject: [PATCH] (perl #133936) document differences between IO::Socket::* and
4dad76
 builtin
4dad76
MIME-Version: 1.0
4dad76
Content-Type: text/plain; charset=UTF-8
4dad76
Content-Transfer-Encoding: 8bit
4dad76
4dad76
Signed-off-by: Petr Písař <ppisar@redhat.com>
4dad76
---
4dad76
 dist/IO/lib/IO/Socket.pm | 43 +++++++++++++++++++++++++++++++++++++---
4dad76
 1 file changed, 40 insertions(+), 3 deletions(-)
4dad76
4dad76
diff --git a/dist/IO/lib/IO/Socket.pm b/dist/IO/lib/IO/Socket.pm
4dad76
index da9e8c94d0..345ffd475d 100644
4dad76
--- a/dist/IO/lib/IO/Socket.pm
4dad76
+++ b/dist/IO/lib/IO/Socket.pm
4dad76
@@ -434,9 +434,6 @@ corresponding built-in functions:
4dad76
     bind
4dad76
     listen
4dad76
     accept
4dad76
-    send
4dad76
-    recv
4dad76
-    peername (getpeername)
4dad76
     sockname (getsockname)
4dad76
     shutdown
4dad76
 
4dad76
@@ -517,6 +514,46 @@ SO_LINGER enabled with a zero timeout, then the peer's close() will generate
4dad76
 a RST segment, upon receipt of which the local TCP transitions immediately to
4dad76
 B<CLOSED>, and in that state, connected() I<will> return undef.
4dad76
 
4dad76
+=item send(MSG, [, FLAGS [, TO ] ])
4dad76
+
4dad76
+Like the built-in L<send()|perlfunc/send>, except that:
4dad76
+
4dad76
+=over
4dad76
+
4dad76
+=item *
4dad76
+
4dad76
+C<FLAGS> is optional and defaults to C<0>, and
4dad76
+
4dad76
+=item *
4dad76
+
4dad76
+after a successful send with C<TO>, further calls to send() without
4dad76
+C<TO> will send to the same address, and C<TO> will be used as the
4dad76
+result of peername().
4dad76
+
4dad76
+=back
4dad76
+
4dad76
+=item recv(BUF, LEN, [,FLAGS])
4dad76
+
4dad76
+Like the built-in L<recv()|perlfunc/recv>, except that:
4dad76
+
4dad76
+=over
4dad76
+
4dad76
+=item *
4dad76
+
4dad76
+C<FLAGS> is optional and defaults to C<0>, and
4dad76
+
4dad76
+=item *
4dad76
+
4dad76
+the cached value returned by peername() is updated with the result of
4dad76
+recv().
4dad76
+
4dad76
+=back
4dad76
+
4dad76
+=item peername
4dad76
+
4dad76
+Returns the cached peername, possibly set by recv() or send() above.
4dad76
+If not otherwise set returns (and caches) the result of getpeername().
4dad76
+
4dad76
 =item protocol
4dad76
 
4dad76
 Returns the numerical number for the protocol being used on the socket, if
4dad76
-- 
4dad76
2.20.1
4dad76