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