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