📄 apache2::connection.3
字号:
.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05).\".\" Standard preamble:.\" ========================================================================.de Sh \" Subsection heading.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...de Sp \" Vertical space (when we can't use .PP).if t .sp .5v.if n .sp...de Vb \" Begin verbatim text.ft CW.nf.ne \\$1...de Ve \" End verbatim text.ft R.fi...\" Set up some character translations and predefined strings. \*(-- will.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left.\" double quote, and \*(R" will give a right double quote. \*(C+ will.\" give a nicer C++. Capital omega is used to do unbreakable dashes and.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,.\" nothing in troff, for use with C<>..tr \(*W-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'.ie n \{\. ds -- \(*W-. ds PI pi. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch. ds L" "". ds R" "". ds C` "". ds C' ""'br\}.el\{\. ds -- \|\(em\|. ds PI \(*p. ds L" ``. ds R" '''br\}.\".\" Escape single quotes in literal strings from groff's Unicode transform..ie \n(.g .ds Aq \(aq.el .ds Aq '.\".\" If the F register is turned on, we'll generate index entries on stderr for.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index.\" entries marked with X<> in POD. Of course, you'll have to process the.\" output yourself in some meaningful fashion..ie \nF \{\. de IX. tm Index:\\$1\t\\n%\t"\\$2"... nr % 0. rr F.\}.el \{\. de IX...\}.\".\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2)..\" Fear. Run. Save yourself. No user-serviceable parts.. \" fudge factors for nroff and troff.if n \{\. ds #H 0. ds #V .8m. ds #F .3m. ds #[ \f1. ds #] \fP.\}.if t \{\. ds #H ((1u-(\\\\n(.fu%2u))*.13m). ds #V .6m. ds #F 0. ds #[ \&. ds #] \&.\}. \" simple accents for nroff and troff.if n \{\. ds ' \&. ds ` \&. ds ^ \&. ds , \&. ds ~ ~. ds /.\}.if t \{\. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u". ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'.\}. \" troff and (daisy-wheel) nroff accents.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'.ds 8 \h'\*(#H'\(*b\h'-\*(#H'.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#].ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#].ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#].ds ae a\h'-(\w'a'u*4/10)'e.ds Ae A\h'-(\w'A'u*4/10)'E. \" corrections for vroff.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'. \" for low resolution devices (crt and lpr).if \n(.H>23 .if \n(.V>19 \\{\. ds : e. ds 8 ss. ds o a. ds d- d\h'-1'\(ga. ds D- D\h'-1'\(hy. ds th \o'bp'. ds Th \o'LP'. ds ae ae. ds Ae AE.\}.rm #[ #] #H #V #F C.\" ========================================================================.\".IX Title "mod_perl-2.0.2::docs::api::Apache2::Connection 3".TH mod_perl-2.0.2::docs::api::Apache2::Connection 3 "2005-10-21" "perl v5.10.0" "User Contributed Perl Documentation".\" For nroff, turn off justification. Always turn off hyphenation; it makes.\" way too many mistakes in technical documents..if n .ad l.nh.SH "NAME"Apache2::Connection \- Perl API for Apache connection object.SH "Synopsis".IX Header "Synopsis".Vb 1\& use Apache2::Connection ();\& \& # is connection still open?\& $status = $c\->aborted;\& \& # base server\& $base_server = $c\->base_server();\& \& # needed for creating buckets/brigades\& $ba = $c\->bucket_alloc();\& \& # client\*(Aqs socket\& $socket = $c\->client_socket;\& \& # unique connection id\& $id = $c\->id();\& \& # connection filters stack\& $input_filters = $c\->input_filters();\& $output_filters = $c\->output_filters();\& \& # keep the connection alive?\& $status = $c\->keepalive();\& \& # how many requests served over the current connection\& $served = $c\->keepalives();\& \& # this connection\*(Aqs local and remote socket addresses\& $local_sa = $c\->local_addr();\& $remote_sa = $c\->remote_addr();\& \& # local and remote hostnames\& $local_host = $c\->local_host();\& $remote_host = $c\->get_remote_host();\& $remote_host = $c\->remote_host();\& \& # server and remote client\*(Aqs IP addresses\& $local_ip = $c\->local_ip();\& $remote_ip = $c\->remote_ip();\& \& # connection level Apache notes\& $notes = $c\->notes();\& \& # this connection\*(Aqs pool\& $p = $c\->pool();.Ve.SH "Description".IX Header "Description"\&\f(CW\*(C`Apache2::RequestRec\*(C'\fR provides the Perl \s-1API\s0 for Apache connectionrecord object..SH "API".IX Header "API"\&\f(CW\*(C`Apache2::Connection\*(C'\fR provides the following functions and/or methods:.ie n .Sh """aborted""".el .Sh "\f(CWaborted\fP".IX Subsection "aborted"Check whether the connection is still open.PP.Vb 1\& $status = $c\->aborted();.Ve.ie n .IP "obj: $c\fR ( \f(CW""Apache2::Connection object"" )" 4.el .IP "obj: \f(CW$c\fR ( \f(CWApache2::Connection object\fR )" 4.IX Item "obj: $c ( Apache2::Connection object )".PD 0.ie n .IP "ret: $status ( boolean )" 4.el .IP "ret: \f(CW$status\fR ( boolean )" 4.IX Item "ret: $status ( boolean )".PDtrue if the connection has been aborted, false if still open.IP "since: 2.0.00" 4.IX Item "since: 2.0.00".ie n .Sh """base_server""".el .Sh "\f(CWbase_server\fP".IX Subsection "base_server"Physical server this connection came in on (main server or vhost):.PP.Vb 1\& $base_server = $c\->base_server();.Ve.ie n .IP "obj: $c\fR ( \f(CW""Apache2::Connection object"" )" 4.el .IP "obj: \f(CW$c\fR ( \f(CWApache2::Connection object\fR )" 4.IX Item "obj: $c ( Apache2::Connection object )".PD 0.ie n .IP "ret: $base_server\fR ( \f(CW""Apache2::Server object"" )" 4.el .IP "ret: \f(CW$base_server\fR ( \f(CWApache2::Server object\fR )" 4.IX Item "ret: $base_server ( Apache2::Server object )".IP "since: 2.0.00" 4.IX Item "since: 2.0.00".PD.ie n .Sh """bucket_alloc""".el .Sh "\f(CWbucket_alloc\fP".IX Subsection "bucket_alloc"The bucket allocator to use for all bucket/brigade creations.PP.Vb 1\& $ba = $c\->bucket_alloc();.Ve.ie n .IP "obj: $c\fR ( \f(CW""Apache2::Connection object"" )" 4.el .IP "obj: \f(CW$c\fR ( \f(CWApache2::Connection object\fR )" 4.IX Item "obj: $c ( Apache2::Connection object )".PD 0.ie n .IP "ret: $ba\fR ( \f(CW""APR::BucketAlloc object"" )" 4.el .IP "ret: \f(CW$ba\fR ( \f(CWAPR::BucketAlloc object\fR )" 4.IX Item "ret: $ba ( APR::BucketAlloc object )".IP "since: 2.0.00" 4.IX Item "since: 2.0.00".PD.PPThis object is needed by \f(CW\*(C`APR::Bucket\*(C'\fRand \f(CW\*(C`APR::Brigade\*(C'\fR methods/functions..ie n .Sh """client_socket""".el .Sh "\f(CWclient_socket\fP".IX Subsection "client_socket"Get/set the client socket.PP.Vb 2\& $socket = $c\->client_socket;\& $prev_socket = $c\->client_socket($new_socket);.Ve.ie n .IP "obj: $c\fR ( \f(CW""Apache2::Connection object"" )" 4.el .IP "obj: \f(CW$c\fR ( \f(CWApache2::Connection object\fR )" 4.IX Item "obj: $c ( Apache2::Connection object )".PD 0.ie n .IP "opt arg1: $new_socket\fR ( \f(CW""APR::Socket object"" object )" 4.el .IP "opt arg1: \f(CW$new_socket\fR ( \f(CWAPR::Socket object\fR object )" 4.IX Item "opt arg1: $new_socket ( APR::Socket object object )".PDIf passed a new socket will be set..ie n .IP "ret: $socket\fR ( \f(CW""APR::Socket object"" object )" 4.el .IP "ret: \f(CW$socket\fR ( \f(CWAPR::Socket object\fR object )" 4.IX Item "ret: $socket ( APR::Socket object object )"current client socket.Spif the optional argument \f(CW$new_socket\fR was passed the previous socketobject is returned..IP "since: 2.0.00" 4.IX Item "since: 2.0.00".ie n .Sh """get_remote_host""".el .Sh "\f(CWget_remote_host\fP".IX Subsection "get_remote_host"Lookup the client's \s-1DNS\s0 hostname or \s-1IP\s0 address.PP.Vb 3\& $remote_host = $c\->remote_host();\& $remote_host = $c\->remote_host($type);\& $remote_host = $c\->remote_host($type, $dir_config);.Ve.ie n .IP "obj: $c\fR ( \f(CW""Apache2::Connection object"" )" 4.el .IP "obj: \f(CW$c\fR ( \f(CWApache2::Connection object\fR )" 4.IX Item "obj: $c ( Apache2::Connection object )"The current connection.ie n .IP "opt arg1: $type\fR ( \f(CW"":remotehost constant"" )" 4.el .IP "opt arg1: \f(CW$type\fR ( \f(CW:remotehost constant\fR )" 4.IX Item "opt arg1: $type ( :remotehost constant )"The type of lookup to perform:.RS 4.ie n .IP """Apache2::Const::REMOTE_DOUBLE_REV""" 4.el .IP "\f(CWApache2::Const::REMOTE_DOUBLE_REV\fR" 4.IX Item "Apache2::Const::REMOTE_DOUBLE_REV"will always force a \s-1DNS\s0 lookup, and also force a double reverselookup, regardless of the \f(CW\*(C`HostnameLookups\*(C'\fR setting. The result isthe (double reverse checked) hostname, or undef if any of the lookupsfail..ie n .IP """Apache2::Const::REMOTE_HOST""" 4.el .IP "\f(CWApache2::Const::REMOTE_HOST\fR" 4.IX Item "Apache2::Const::REMOTE_HOST"returns the hostname, or \f(CW\*(C`undef\*(C'\fR if the hostname lookup fails. Itwill force a \s-1DNS\s0 lookup according to the \f(CW\*(C`HostnameLookups\*(C'\fR setting..ie n .IP """Apache2::Const::REMOTE_NAME""" 4.el .IP "\f(CWApache2::Const::REMOTE_NAME\fR" 4.IX Item "Apache2::Const::REMOTE_NAME"returns the hostname, or the dotted quad if the hostname lookup fails.It will force a \s-1DNS\s0 lookup according to the \f(CW\*(C`HostnameLookups\*(C'\fRsetting..ie n .IP """Apache2::Const::REMOTE_NOLOOKUP""" 4.el .IP "\f(CWApache2::Const::REMOTE_NOLOOKUP\fR" 4.IX Item "Apache2::Const::REMOTE_NOLOOKUP"is like \f(CW\*(C`Apache2::Const::REMOTE_NAME\*(C'\fR except that a \s-1DNS\s0 lookup is neverforced..RE.RS 4.SpDefault value is \f(CW\*(C`Apache2::Const::REMOTE_NAME\*(C'\fR..RE.ie n .IP "opt arg2: $dir_config\fR ( \f(CW""Apache2::ConfVector object"" )" 4.el .IP "opt arg2: \f(CW$dir_config\fR ( \f(CWApache2::ConfVector object\fR )" 4.IX Item "opt arg2: $dir_config ( Apache2::ConfVector object )"The directory config vector from the request. It's needed to find thecontainer in which the directive \f(CW\*(C`HostnameLookups\*(C'\fR is set. To get onefor the current request use\&\f(CW\*(C`$r\->per_dir_config\*(C'\fR..SpBy default, \f(CW\*(C`undef\*(C'\fR is passed, in which case it's the same as if\&\f(CW\*(C`HostnameLookups\*(C'\fR was set to \f(CW\*(C`Off\*(C'\fR..ie n .IP "ret: $remote_host ( string/undef )" 4.el .IP "ret: \f(CW$remote_host\fR ( string/undef )" 4.IX Item "ret: $remote_host ( string/undef )"The remote hostname. If the configuration directive\&\fBHostNameLookups\fR is set to off, this returns the dotted decimalrepresentation of the client's \s-1IP\s0 address instead. Might return\&\f(CW\*(C`undef\*(C'\fR if the hostname is not known..IP "since: 2.0.00" 4.IX Item "since: 2.0.00".PPThe result of \f(CW\*(C`get_remote_host\*(C'\fR call is cached in\&\f(CW\*(C`$c\->remote_host\*(C'\fR. If the latter is set,\&\f(CW\*(C`get_remote_host\*(C'\fR will return that value immediately, w/o doing anycheckups..ie n .Sh """id""".el .Sh "\f(CWid\fP".IX Subsection "id"\&\s-1ID\s0 of this connection; unique at any point in time.PP.Vb 1\& $id = $c\->id();.Ve.ie n .IP "obj: $c\fR ( \f(CW""Apache2::Connection object"" )" 4.el .IP "obj: \f(CW$c\fR ( \f(CWApache2::Connection object\fR )" 4.IX Item "obj: $c ( Apache2::Connection object )".PD 0.ie n .IP "ret: $id (integer)" 4.el .IP "ret: \f(CW$id\fR (integer)" 4.IX Item "ret: $id (integer)".IP "since: 2.0.00" 4.IX Item "since: 2.0.00".PD.ie n .Sh """input_filters""".el .Sh "\f(CWinput_filters\fP".IX Subsection "input_filters"Get/set the first filter in a linked list of protocol level inputfilters:.PP.Vb 2\& $input_filters = $c\->input_filters();\& $prev_input_filters = $c\->input_filters($new_input_filters);.Ve.ie n .IP "obj: $c\fR ( \f(CW""Apache2::Connection object"" )" 4.el .IP "obj: \f(CW$c\fR ( \f(CWApache2::Connection object\fR )" 4.IX Item "obj: $c ( Apache2::Connection object )".PD 0.ie n .IP "opt arg1: $new_input_filters" 4.el .IP "opt arg1: \f(CW$new_input_filters\fR" 4.IX Item "opt arg1: $new_input_filters"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -