/usr/share/doc/libapache2-mod-perl2-doc/docs/2.0/api/Apache2/Connection.html is in libapache2-mod-perl2-doc 2.0.8+httpd24-r1449661-6ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 | <?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>
<body style="background-color: white">
<ul id="index">
<li><a href="#NAME">NAME</a></li>
<li><a href="#Synopsis">Synopsis</a></li>
<li><a href="#Description">Description</a></li>
<li><a href="#API">API</a>
<ul>
<li><a href="#aborted">aborted</a></li>
<li><a href="#base_server">base_server</a></li>
<li><a href="#bucket_alloc">bucket_alloc</a></li>
<li><a href="#client_socket">client_socket</a></li>
<li><a href="#get_remote_host">get_remote_host</a></li>
<li><a href="#id">id</a></li>
<li><a href="#input_filters">input_filters</a></li>
<li><a href="#keepalive">keepalive</a></li>
<li><a href="#keepalives">keepalives</a></li>
<li><a href="#local_addr">local_addr</a></li>
<li><a href="#local_host">local_host</a></li>
<li><a href="#local_ip">local_ip</a></li>
<li><a href="#notes">notes</a></li>
<li><a href="#output_filters">output_filters</a></li>
<li><a href="#pool">pool</a></li>
<li><a href="#remote_addr">remote_addr</a></li>
<li><a href="#remote_ip">remote_ip</a></li>
<li><a href="#remote_host">remote_host</a></li>
</ul>
</li>
<li><a href="#Unsupported-API">Unsupported API</a>
<ul>
<li><a href="#conn_config">conn_config</a></li>
<li><a href="#sbh">sbh</a></li>
</ul>
</li>
<li><a href="#See-Also">See Also</a></li>
<li><a href="#Copyright">Copyright</a></li>
<li><a href="#Authors">Authors</a></li>
</ul>
<h1 id="NAME">NAME</h1>
<p>Apache2::Connection - Perl API for Apache connection object</p>
<h1 id="Synopsis">Synopsis</h1>
<pre><code> use Apache2::Connection ();
use Apache2::RequestRec ();
my $c = $r->connection;
my $c = $r->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's 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's 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's IP addresses
$local_ip = $c->local_ip();
$remote_ip = $c->remote_ip();
# connection level Apache notes
$notes = $c->notes();
# this connection's pool
$p = $c->pool();</code></pre>
<h1 id="Description">Description</h1>
<p><code>Apache2::RequestRec</code> provides the Perl API for Apache connection record object.</p>
<h1 id="API">API</h1>
<p><code>Apache2::Connection</code> provides the following functions and/or methods:</p>
<h2 id="aborted"><code>aborted</code></h2>
<p>Check whether the connection is still open</p>
<pre><code> $status = $c->aborted();</code></pre>
<dl>
<dt id="obj:-c-Apache2::Connection-object">obj: <code>$c</code> ( <code><a>Apache2::Connection object</a></code> )</dt>
<dd>
</dd>
<dt id="ret:-status-boolean">ret: <code>$status</code> ( boolean )</dt>
<dd>
<p>true if the connection has been aborted, false if still open</p>
</dd>
<dt id="since:-2.0.00">since: 2.0.00</dt>
<dd>
</dd>
</dl>
<h2 id="base_server"><code>base_server</code></h2>
<p>Physical server this connection came in on (main server or vhost):</p>
<pre><code> $base_server = $c->base_server();</code></pre>
<dl>
<dt id="obj:-c-Apache2::Connection-object1">obj: <code>$c</code> ( <code><a>Apache2::Connection object</a></code> )</dt>
<dd>
</dd>
<dt id="ret:-base_server-Apache2::Server-object">ret: <code>$base_server</code> ( <code><a>Apache2::Server object</a></code> )</dt>
<dd>
</dd>
<dt id="since:-2.0.001">since: 2.0.00</dt>
<dd>
</dd>
</dl>
<h2 id="bucket_alloc"><code>bucket_alloc</code></h2>
<p>The bucket allocator to use for all bucket/brigade creations</p>
<pre><code> $ba = $c->bucket_alloc();</code></pre>
<dl>
<dt id="obj:-c-Apache2::Connection-object2">obj: <code>$c</code> ( <code><a>Apache2::Connection object</a></code> )</dt>
<dd>
</dd>
<dt id="ret:-ba-APR::BucketAlloc-object">ret: <code>$ba</code> ( <code><a>APR::BucketAlloc object</a></code> )</dt>
<dd>
</dd>
<dt id="since:-2.0.002">since: 2.0.00</dt>
<dd>
</dd>
</dl>
<p>This object is needed by <code><a>APR::Bucket</a></code> and <code><a>APR::Brigade</a></code> methods/functions.</p>
<h2 id="client_socket"><code>client_socket</code></h2>
<p>Get/set the client socket</p>
<pre><code> $socket = $c->client_socket;
$prev_socket = $c->client_socket($new_socket);</code></pre>
<dl>
<dt id="obj:-c-Apache2::Connection-object3">obj: <code>$c</code> ( <code><a>Apache2::Connection object</a></code> )</dt>
<dd>
</dd>
<dt id="opt-arg1:-new_socket-APR::Socket-object-object">opt arg1: <code>$new_socket</code> ( <code><a>APR::Socket object</a></code> object )</dt>
<dd>
<p>If passed a new socket will be set.</p>
</dd>
<dt id="ret:-socket-APR::Socket-object-object">ret: <code>$socket</code> ( <code><a>APR::Socket object</a></code> object )</dt>
<dd>
<p>current client socket</p>
<p>if the optional argument <code>$new_socket</code> was passed the previous socket object is returned.</p>
</dd>
<dt id="since:-2.0.003">since: 2.0.00</dt>
<dd>
</dd>
</dl>
<h2 id="get_remote_host"><code>get_remote_host</code></h2>
<p>Lookup the client's DNS hostname or IP address</p>
<pre><code> $remote_host = $c->remote_host();
$remote_host = $c->remote_host($type);
$remote_host = $c->remote_host($type, $dir_config);</code></pre>
<dl>
<dt id="obj:-c-Apache2::Connection-object4">obj: <code>$c</code> ( <code><a>Apache2::Connection object</a></code> )</dt>
<dd>
<p>The current connection</p>
</dd>
<dt id="opt-arg1:-type-:remotehost-constant">opt arg1: <code>$type</code> ( <code><a>:remotehost constant</a></code> )</dt>
<dd>
<p>The type of lookup to perform:</p>
<dl>
<dt id="Apache2::Const::REMOTE_DOUBLE_REV"><code>Apache2::Const::REMOTE_DOUBLE_REV</code></dt>
<dd>
<p>will always force a DNS lookup, and also force a double reverse lookup, regardless of the <code>HostnameLookups</code> setting. The result is the (double reverse checked) hostname, or undef if any of the lookups fail.</p>
</dd>
<dt id="Apache2::Const::REMOTE_HOST"><code>Apache2::Const::REMOTE_HOST</code></dt>
<dd>
<p>returns the hostname, or <code>undef</code> if the hostname lookup fails. It will force a DNS lookup according to the <code>HostnameLookups</code> setting.</p>
</dd>
<dt id="Apache2::Const::REMOTE_NAME"><code>Apache2::Const::REMOTE_NAME</code></dt>
<dd>
<p>returns the hostname, or the dotted quad if the hostname lookup fails. It will force a DNS lookup according to the <code>HostnameLookups</code> setting.</p>
</dd>
<dt id="Apache2::Const::REMOTE_NOLOOKUP"><code>Apache2::Const::REMOTE_NOLOOKUP</code></dt>
<dd>
<p>is like <code>Apache2::Const::REMOTE_NAME</code> except that a DNS lookup is never forced.</p>
</dd>
</dl>
<p>Default value is <code>Apache2::Const::REMOTE_NAME</code>.</p>
</dd>
<dt id="opt-arg2:-dir_config-Apache2::ConfVector-object">opt arg2: <code>$dir_config</code> ( <code><a>Apache2::ConfVector object</a></code> )</dt>
<dd>
<p>The directory config vector from the request. It's needed to find the container in which the directive <code>HostnameLookups</code> is set. To get one for the current request use <code><a>$r->per_dir_config</a></code>.</p>
<p>By default, <code>undef</code> is passed, in which case it's the same as if <code>HostnameLookups</code> was set to <code>Off</code>.</p>
</dd>
<dt id="ret:-remote_host-string-undef">ret: <code>$remote_host</code> ( string/undef )</dt>
<dd>
<p>The remote hostname. If the configuration directive <b>HostNameLookups</b> is set to off, this returns the dotted decimal representation of the client's IP address instead. Might return <code>undef</code> if the hostname is not known.</p>
</dd>
<dt id="since:-2.0.004">since: 2.0.00</dt>
<dd>
</dd>
</dl>
<p>The result of <code>get_remote_host</code> call is cached in <code><a href="#C_remote_host_">$c->remote_host</a></code>. If the latter is set, <code>get_remote_host</code> will return that value immediately, w/o doing any checkups.</p>
<h2 id="id"><code>id</code></h2>
<p>ID of this connection; unique at any point in time</p>
<pre><code> $id = $c->id();</code></pre>
<dl>
<dt id="obj:-c-Apache2::Connection-object5">obj: <code>$c</code> ( <code><a>Apache2::Connection object</a></code> )</dt>
<dd>
</dd>
<dt id="ret:-id-integer">ret: <code>$id</code> (integer)</dt>
<dd>
</dd>
<dt id="since:-2.0.005">since: 2.0.00</dt>
<dd>
</dd>
</dl>
<h2 id="input_filters"><code>input_filters</code></h2>
<p>Get/set the first filter in a linked list of protocol level input filters:</p>
<pre><code> $input_filters = $c->input_filters();
$prev_input_filters = $c->input_filters($new_input_filters);</code></pre>
<dl>
<dt id="obj:-c-Apache2::Connection-object6">obj: <code>$c</code> ( <code><a>Apache2::Connection object</a></code> )</dt>
<dd>
</dd>
<dt id="opt-arg1:-new_input_filters">opt arg1: <code>$new_input_filters</code></dt>
<dd>
<p>Set a new value</p>
</dd>
<dt id="ret:-input_filters-Apache2::Filter-object">ret: <code>$input_filters</code> ( <code><a>Apache2::Filter object</a></code> )</dt>
<dd>
<p>The first filter in the connection input filters chain.</p>
<p>If <code>$new_input_filters</code> was passed, returns the previous value.</p>
</dd>
<dt id="since:-2.0.006">since: 2.0.00</dt>
<dd>
</dd>
</dl>
<p>For an example see: <a>Bucket Brigades-based Protocol Module</a></p>
<h2 id="keepalive"><code>keepalive</code></h2>
<p>This method answers the question: Should the the connection be kept alive for another HTTP request after the current request is completed?</p>
<pre><code> $status = $c->keepalive();
$status = $c->keepalive($new_status);</code></pre>
<dl>
<dt id="obj:-c-Apache2::Connection-object7">obj: <code>$c</code> ( <code><a>Apache2::Connection object</a></code> )</dt>
<dd>
</dd>
<dt id="opt-arg1:-new_status-:conn_keepalive-constant">opt arg1: <code>$new_status</code> ( <code><a>:conn_keepalive constant</a></code> )</dt>
<dd>
<p>Normally you should not mess with setting this option when handling the HTTP protocol. If you do (for example when sending your own headers set with <code><a>$r->assbackwards</a></code>) -- take a look at the ap_set_keepalive() function in <i>httpd-2.0/modules/http/http_protocol.c</i>.</p>
</dd>
<dt id="ret:-status-:conn_keepalive-constant">ret: <code>$status</code> ( <code><a>:conn_keepalive constant</a></code> )</dt>
<dd>
<p>The method does <b>not</b> return true or false, but one of the states which can be compared against (<code><a>:conn_keepalive constants</a></code>).</p>
</dd>
<dt id="since:-2.0.007">since: 2.0.00</dt>
<dd>
</dd>
</dl>
<p>Unless you set this value yourself when implementing non-HTTP protocols, it's only relevant for HTTP requests.</p>
<p>For example:</p>
<pre><code> use Apache2::RequestRec ();
use Apache2::Connection ();
use Apache2::Const -compile => qw(:conn_keepalive);
...
my $c = $r->connection;
if ($c->keepalive == Apache2::Const::CONN_KEEPALIVE) {
# do something
}
elsif ($c->keepalive == Apache2::Const::CONN_CLOSE) {
# do something else
}
elsif ($c->keepalive == Apache2::Const::CONN_UNKNOWN) {
# do yet something else
}
else {
# die "unknown state";
}</code></pre>
<p>Notice that new states could be added later by Apache, so your code should make no assumptions and do things only if the desired state matches.</p>
<h2 id="keepalives"><code>keepalives</code></h2>
<p>How many requests were already served over the current connection.</p>
<pre><code> $served = $c->keepalives();
$served = $c->keepalives($new_served);</code></pre>
<dl>
<dt id="obj:-c-Apache2::Connection-object8">obj: <code>$c</code> ( <code><a>Apache2::Connection object</a></code> )</dt>
<dd>
</dd>
<dt id="opt-arg1:-new_served-integer">opt arg1: <code>$new_served</code> (integer)</dt>
<dd>
<p>Set the number of served requests over the current connection. Normally you won't do that when handling HTTP requests. (But see below a note regarding <code><a>$r->assbackwards</a></code>).</p>
</dd>
<dt id="ret:-served-integer">ret: <code>$served</code> (integer)</dt>
<dd>
<p>How many requests were already served over the current connection.</p>
<p>In most handlers, but HTTP output filter handlers, that value doesn't count the current request. For the latter it'll count the current request.</p>
</dd>
<dt id="since:-2.0.008">since: 2.0.00</dt>
<dd>
</dd>
</dl>
<p>This method is only relevant for <a href="#C_keepalive_">keepalive</a> connections. The core connection output filter <code>ap_http_header_filter</code> increments this value when the response headers are sent and it decides that the connection should not be closed (see <code>ap_set_keepalive()</code>).</p>
<p>If you send your own set of HTTP headers with <code><a>$r->assbackwards</a></code>, which includes the <code>Keep-Alive</code> HTTP response header, you must make sure to increment the <code>keepalives</code> counter.</p>
<h2 id="local_addr"><code>local_addr</code></h2>
<p>Get this connection's local socket address</p>
<pre><code> $local_sa = $c->local_addr();</code></pre>
<dl>
<dt id="obj:-c-Apache2::Connection-object9">obj: <code>$c</code> ( <code><a>Apache2::Connection object</a></code> )</dt>
<dd>
</dd>
<dt id="ret:-local_sa-APR::SockAddr-object">ret: <code>$local_sa</code> ( <code><a>APR::SockAddr object</a></code> )</dt>
<dd>
</dd>
<dt id="since:-2.0.009">since: 2.0.00</dt>
<dd>
</dd>
</dl>
<h2 id="local_host"><code>local_host</code></h2>
<p>used for ap_get_server_name when UseCanonicalName is set to DNS (ignores setting of HostnameLookups)</p>
<pre><code> $local_host = $c->local_host();</code></pre>
<dl>
<dt id="obj:-c-Apache2::Connection-object10">obj: <code>$c</code> ( <code><a>Apache2::Connection object</a></code> )</dt>
<dd>
</dd>
<dt id="ret:-local_host-string">ret: <code>$local_host</code> (string)</dt>
<dd>
</dd>
<dt id="since:-2.0.0010">since: 2.0.00</dt>
<dd>
</dd>
</dl>
<p>META: you probably shouldn't use this method, but ( <code><a>get_server_name</a></code> ) if inside request and <code>$r</code> is available.</p>
<h2 id="local_ip"><code>local_ip</code></h2>
<p>server IP address</p>
<pre><code> $local_ip = $c->local_ip();</code></pre>
<dl>
<dt id="obj:-c-Apache2::Connection-object11">obj: <code>$c</code> ( <code><a>Apache2::Connection object</a></code> )</dt>
<dd>
</dd>
<dt id="ret:-local_ip-string">ret: <code>$local_ip</code> (string)</dt>
<dd>
</dd>
<dt id="since:-2.0.0011">since: 2.0.00</dt>
<dd>
</dd>
</dl>
<h2 id="notes"><code>notes</code></h2>
<p>Get/set text notes for the duration of this connection. These notes can be passed from one module to another (not only mod_perl, but modules in any other language):</p>
<pre><code> $notes = $c->notes();
$prev_notes = $c->notes($new_notes);</code></pre>
<dl>
<dt id="obj:-c-Apache2::Connection-object12">obj: <code>$c</code> ( <code><a>Apache2::Connection object</a></code> )</dt>
<dd>
</dd>
<dt id="opt-arg1:-new_notes-APR::Table-object">opt arg1: <code>$new_notes</code> ( <code><a>APR::Table object</a></code> )</dt>
<dd>
</dd>
<dt id="ret:-notes-APR::Table-object">ret: <code>$notes</code> ( <code><a>APR::Table object</a></code> )</dt>
<dd>
<p>the current notes table.</p>
<p>if the <code>$new_notes</code> argument was passed, returns the previous value.</p>
</dd>
<dt id="since:-2.0.0012">since: 2.0.00</dt>
<dd>
</dd>
</dl>
<p>Also see <code><a>$r->notes</a></code></p>
<h2 id="output_filters"><code>output_filters</code></h2>
<p>Get the first filter in a linked list of protocol level output filters:</p>
<pre><code> $output_filters = $c->output_filters();
$prev_output_filters = $r->output_filters($new_output_filters);</code></pre>
<dl>
<dt id="obj:-c-Apache2::Connection-object13">obj: <code>$c</code> ( <code><a>Apache2::Connection object</a></code> )</dt>
<dd>
</dd>
<dt id="opt-arg1:-new_output_filters">opt arg1: <code>$new_output_filters</code></dt>
<dd>
<p>Set a new value</p>
</dd>
<dt id="ret:-output_filters-Apache2::Filter-object">ret: <code>$output_filters</code> ( <code><a>Apache2::Filter object</a></code> )</dt>
<dd>
<p>The first filter in the connection output filters chain.</p>
<p>If <code>$new_output_filters</code> was passed, returns the previous value.</p>
</dd>
<dt id="since:-2.0.0013">since: 2.0.00</dt>
<dd>
</dd>
</dl>
<p>For an example see: <a>Bucket Brigades-based Protocol Module</a></p>
<h2 id="pool"><code>pool</code></h2>
<p>Pool associated with this connection</p>
<pre><code> $p = $c->pool();</code></pre>
<dl>
<dt id="obj:-c-Apache2::Connection-object14">obj: <code>$c</code> ( <code><a>Apache2::Connection object</a></code> )</dt>
<dd>
</dd>
<dt id="ret:-p-APR::Pool-object">ret: <code>$p</code> ( <code><a>APR::Pool object</a></code> )</dt>
<dd>
</dd>
<dt id="since:-2.0.0014">since: 2.0.00</dt>
<dd>
</dd>
</dl>
<h2 id="remote_addr"><code>remote_addr</code></h2>
<p>Get this connection's remote socket address</p>
<pre><code> $remote_sa = $c->remote_addr();</code></pre>
<dl>
<dt id="obj:-c-Apache2::Connection-object15">obj: <code>$c</code> ( <code><a>Apache2::Connection object</a></code> )</dt>
<dd>
</dd>
<dt id="ret:-remote_sa-APR::SockAddr-object">ret: <code>$remote_sa</code> ( <code><a>APR::SockAddr object</a></code> )</dt>
<dd>
</dd>
<dt id="since:-2.0.0015">since: 2.0.00</dt>
<dd>
</dd>
</dl>
<h2 id="remote_ip"><code>remote_ip</code></h2>
<p>Client's IP address</p>
<pre><code> $remote_ip = $c->remote_ip();
$prev_remote_ip = $c->remote_ip($new_remote_ip);</code></pre>
<dl>
<dt id="obj:-c-Apache2::Connection-object16">obj: <code>$c</code> ( <code><a>Apache2::Connection object</a></code> )</dt>
<dd>
</dd>
<dt id="opt-arg1:-new_remote_ip-string">opt arg1: <code>$new_remote_ip</code> ( string )</dt>
<dd>
<p>If passed a new value will be set</p>
</dd>
<dt id="ret:-remote_ip-string">ret: <code>$remote_ip</code> ( string )</dt>
<dd>
<p>current remote ip address</p>
<p>if the optional argument <code>$new_remote_ip</code> was passed the previous value is returned.</p>
</dd>
<dt id="since:-2.0.0016">since: 2.0.00</dt>
<dd>
</dd>
</dl>
<h2 id="remote_host"><code>remote_host</code></h2>
<p>Client's DNS name:</p>
<pre><code> $remote_host = $c->remote_host();</code></pre>
<dl>
<dt id="obj:-c-Apache2::Connection-object17">obj: <code>$c</code> ( <code><a>Apache2::Connection object</a></code> )</dt>
<dd>
</dd>
<dt id="ret:-remote_host-string-undef1">ret: <code>$remote_host</code> ( string/undef )</dt>
<dd>
<p>If <code><a href="#C_get_remote_host_">$c->get_remote_host</a></code> was run it returns the cached value, which is a client DNS name or <code>""</code> if it wasn't found. If the check wasn't run -- <code>undef</code> is returned.</p>
</dd>
<dt id="since:-2.0.0017">since: 2.0.00</dt>
<dd>
</dd>
</dl>
<p>It's best to to call <code><a href="#C_get_remote_host_">$c->get_remote_host</a></code> instead of directly accessing this variable.</p>
<h1 id="Unsupported-API">Unsupported API</h1>
<p><code>Apache2::Connection</code> 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 <a>the mod_perl development mailing list</a> so we can help each other take the steps necessary to shift the method to an officially supported API.</p>
<h2 id="conn_config"><code>conn_config</code></h2>
<p>Config vector containing pointers to connections per-server config structures</p>
<pre><code> $ret = $c->conn_config();</code></pre>
<dl>
<dt id="obj:-c-Apache2::Connection-object18">obj: <code>$c</code> ( <code><a>Apache2::Connection object</a></code> )</dt>
<dd>
</dd>
<dt id="ret:-ret-Apache2::ConfVector-object">ret: <code>$ret</code> ( <code><a>Apache2::ConfVector object</a></code> )</dt>
<dd>
</dd>
<dt id="since:-2.0.0018">since: 2.0.00</dt>
<dd>
</dd>
</dl>
<h2 id="sbh"><code>sbh</code></h2>
<p>META: Autogenerated - needs to be reviewed/completed</p>
<p>handle to scoreboard information for this connection</p>
<pre><code> $sbh = $c->sbh();</code></pre>
<dl>
<dt id="obj:-c-Apache2::Connection-object19">obj: <code>$c</code> ( <code><a>Apache2::Connection object</a></code> )</dt>
<dd>
</dd>
<dt id="ret:-sbh-XXX">ret: <code>$sbh</code> (XXX)</dt>
<dd>
</dd>
<dt id="since:-2.0.0019">since: 2.0.00</dt>
<dd>
</dd>
</dl>
<p>META: Not sure how this can be used from mod_perl at the moment. Unless <code>Apache2::Scoreboard</code> is extended to provide a hook to read from this variable.</p>
<h1 id="See-Also">See Also</h1>
<p><a>mod_perl 2.0 documentation</a>.</p>
<h1 id="Copyright">Copyright</h1>
<p>mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0.</p>
<h1 id="Authors">Authors</h1>
<p><a>The mod_perl development team and numerous contributors</a>.</p>
</body>
</html>
|