The Apache Connection
class contains information
related to the network connection associated with the current request.
You can obtain the Connection
instance associated
with the current request using the Request::connection()
method.
Table B.3, “Apache Connection Methods” contains the exhaustive list of methods, in alphabetical order. The documentation of each method follows.
Table B.3. Apache Connection Methods
Type | Name | Args |
---|---|---|
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
aborted()
returns 1 if the connection is open, 0 if
it is closed.
id()
returns the unique (integer) ID of the current
connection. It is assigned internally by Apache.
keepalive()
returns 1 of the keepalive is
enabled.
local_host()
is used for
ap_get_server_name()
when UseCanonicalName
is set to DNS (ignores setting of HostnameLookups)
local_ip()
returns a string containing the server's
IP address.
remote_host()
returns the client's DNS name, if
known, or nil
if DNS hasn't been checked. It returns "" if no
address was found. N.B. only access this though
get_remote_host()
.
remote_ip()
returns a string containing the remote IP
address.
remote_logname()
is only ever set if doing rfc1413
lookups. It's better to access this through
Request::get_remote_logname()
.