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