diff options
author | Tony Cook <tony@develop-help.com> | 2019-03-18 16:02:33 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2019-06-17 09:35:46 +1000 |
commit | 1d9630e7857d6fbae6fddd261fbb80c9c9a8cfd6 (patch) | |
tree | 3039c39514c8bf5dc19bd8894c0bc2523ab935fc /dist/IO | |
parent | 229dff1ea726e744f983d06b20f0a1803a7b6e9f (diff) | |
download | perl-1d9630e7857d6fbae6fddd261fbb80c9c9a8cfd6.tar.gz |
(perl #133936) document differences between IO::Socket::* and builtin
Diffstat (limited to 'dist/IO')
-rw-r--r-- | dist/IO/lib/IO/Socket.pm | 43 |
1 files 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<CLOSED>, and in that state, connected() I<will> return undef. +=item send(MSG, [, FLAGS [, TO ] ]) + +Like the built-in L<send()|perlfunc/send>, except that: + +=over + +=item * + +C<FLAGS> is optional and defaults to C<0>, and + +=item * + +after a successful send with C<TO>, further calls to send() without +C<TO> will send to the same address, and C<TO> will be used as the +result of peername(). + +=back + +=item recv(BUF, LEN, [,FLAGS]) + +Like the built-in L<recv()|perlfunc/recv>, except that: + +=over + +=item * + +C<FLAGS> 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 |