4.5.5.1 Connection Methods

log_error( message[, level])
An interface to the Apache ap_log_cerror function. message is a string with the error message, level is one of the following flags constants:

    APLOG_EMERG
    APLOG_ALERT
    APLOG_CRIT
    APLOG_ERR
    APLOG_WARNING
    APLOG_NOTICE
    APLOG_INFO
    APLOG_DEBUG
    APLOG_NOERRNO

If you need to write to log and do not have a reference to a connection or request object, use the apache.log_error function.

read( [length])
Reads at most length bytes from the client. The read blocks indefinitely until there is at least one byte to read. If length is -1, keep reading until the socket is closed from the other end (This is known as EXHAUSTIVE mode in the http server code).

This method should only be used inside Connection Handlers.

Note: The behaviour of this method has changed since version 3.0.3. In 3.0.3 and prior, this method would block until length bytes was read.

readline( [length])

Reads a line from the connection or up to length bytes.

This method should only be used inside Connection Handlers.

write( string)

Writes string to the client.

This method should only be used inside Connection Handlers.