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