Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
POSIX::getpeername(3) User Contributed Perl DocumentationPOSIX::getpeername(3)

NAME
       POSIX::getpeername - provides getpeername(2)

SYNOPSIS
	   use POSIX::getpeername;
	   use Socket;

	   my $ret = POSIX::getpeername::_getpeername($fd, my $addr);
	   die $! if $ret < 0;
	   my ($peer_port, $peer_iaddr)	= sockaddr_in($addr);

DESCRIPTION
       POSIX::getpeername provides getpeername(2). perl's core getpeername
       needs a open file handle.  POSIX::getpeername allows you	to get
       peername	from sockfd.

RETURN VALUES
       The _getpeername() function returns the value 0 if successful;
       otherwise the value -1 is returned and set errno	to $!

SEE ALSO
       POSIX::Socket, Socket

LICENSE
       Copyright (C) Masahiro Nagano.

       This library is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

AUTHOR
       Masahiro	Nagano <kazeburo@gmail.com>

perl v5.24.1			  2017-07-02		 POSIX::getpeername(3)

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | SEE ALSO | LICENSE | AUTHOR

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=POSIX::getpeername&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help