Manual Pages for UNIX Darwin command on man APR::SockAddr
MyWebUniversity

Manual Pages for UNIX Darwin command on man APR::SockAddr

apachemodappearclh-e10m1o.d1~p2Ue:sr:elmr-o1dC0o1pn.et1rr~li2-b:2u:.tm0eo.dd2:Pp:eedrrollc-sD2:o.:c0au.pm2ie::n::tdAaoPtcRis:o::n:Saopcik:A:dAdPrR(:3:)SockAddr(3)

NAME

APR::SockAddr - Perl API for APR socket address structure

SSyynnooppssiiss

use APR::SockAddr ();

my $ip = $sockaddr->ipget;

my $port = $sockaddr->port;

DDeessccrriippttiioonn

"APR::SockAddr" provides an access to a socket address structure

fields. Normally you'd get a socket address object, by calling: use Apache2::Connection ();

my $remotesockaddr = $c->remoteaddr;

my $localsockaddr = $c->remotelocal;

AAPPII

"APR::SockAddr" provides the following functions and/or methods:

""iippggeett"" Get the IP address of the socket

$ip = $sockaddr->ipget();

obj: $sockaddr ( "APR::SockAddr object" )

ret: $ip ( string )

since: 2.0.00 If you are familiar with how perl's "Socket" works: use Socket 'sockaddrin';

my ($serverport, $serverip) = sockaddrin(getpeername($localsock));

my ($remoteport, $remoteip) = sockaddrin(getpeername($remotesock));

in apr-speak that'd be written as:

use APR::SockAddr ();

use Apache2::Connection ();

my $serverport = $c->localaddr->port;

my $serverip = $c->localaddr->ipget;

my $remoteport = $c->remoteaddr->port;

my $remoteip = $c->remoteaddr->ipget;

""ppoorrtt"" Get the IP address of the socket

$port = $sockaddr->port();

obj: $sockaddr ( "APR::SockAddr object" )

ret: $port ( integer )

since: 2.0.00 Example: see "ipget()" UUnnssuuppppoorrtteedd AAPPII

"APR::SockAddr" also provides auto-generated Perl interface for a few

other methods which aren't tested at the moment and therefore their API is a subject to change. These methods will be finalized later as a need arises. If you want to rely on any of the following methods please contact the the modperl development mailing list so we can help each other take the steps necessary to shift the method to an officially supported API. ""eeqquuaall""

META: Autogenerated - needs to be reviewed/completed

See if the IP addresses in two APR socket addresses are equivalent.

Appropriate logic is present for comparing IPv4-mapped IPv6 addresses

with IPv4 addresses.

$ret = $addr1->equal($addr2);

obj: $addr1 ( "APR::SockAddr object" )

One of the APR socket addresses.

arg1: $addr2 ( "APR::SockAddr object" )

The other APR socket address.

ret: $ret ( integer )

since: subject to change

The return value will be non-zero if the addresses are equivalent.

SSeeee AAllssoo modperl 2.0 documentation. CCooppyyrriigghhtt modperl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0. AAuutthhoorrss The modperl development team and numerous contributors.

perl v5.8.8apachemodperl-101.1~2:2:0m0o5d-1p0e-r2l0-2.0.2::docs::api::APR::SockAddr(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™