SUMMARY: CONSTR | METHOD | DETAIL: CONSTR | METHOD |
Copyright© 2006, Dean Arnold, Presicient Corp., USA
All rights reserved.
Licensed under the Academic Free License version 2.1, as specified in the License.txt file included in this software package, or at OpenSource.org.
Unless otherwise noted, $self
is the object instance variable.
Method Summary |
---|
addAll()
Add ourself to all the selector's selectors |
addExcept()
Add ourself to the selector's exception selector |
addNoWrite()
Add ourself to the selector's read and exception selectors |
addRead()
Add ourself to the selector's read selector |
addWrite()
Add ourself to the selector's write selector |
close()
Close the socket |
daemon()
Return parent WebClient object |
getContext()
Returns the current context object |
getSelector()
Return the current selector |
get_request($only_headers)
Get client request |
handleSocketEvent($eventmask)
Handle an event on the socket |
removeAll()
Remove ourself from all the selector's selectors |
removeContext()
Remove the context object |
removeExcept()
Remove ourself from the selector's exception selector |
removeNoWrite()
Remove ourself from the selector's read and exception selectors |
removeRead()
Remove ourself from the selector's read selector |
removeSelector()
Remove selector object |
removeWrite()
Remove ourself from the selector's write selector |
send_error($status, $errormsg)
Return error response to a request |
send_file_header()
Return response to a HEAD request for a file |
send_file_response()
Return response to a GET or POST request for a file |
send_redirect($loc, $status, $content)
Return redirect response to a request |
send_response()
Return response to a GET or POST request |
setContext($context, $getpeer)
Set the context object |
setSelector($selector)
Set the HTTP::Daemon::Threaded::IOSelector object |
Method Details |
---|
addAll()
addExcept()
addNoWrite()
addRead()
addWrite()
close()
daemon()
getContext()
getSelector()
get_request($only_headers)
$only_headers
- boolean; true => only retrieve HTTP headers
handleSocketEvent($eventmask)
$eventmask
- bitmask indicating read, write, or exception event
removeAll()
removeContext()
removeExcept()
removeNoWrite()
removeRead()
removeSelector()
removeWrite()
send_error($status, $errormsg)
$status
- (optional) HTTP status code of the error; default 400.
$errormsg
- (optional) Error message text to be included body of response.
send_file_header()
send_file_response()
send_redirect($loc, $status, $content)
$loc
- URL of new target location
$status
- (optional) redirect status code (default 301).
$content
- (optional) Any alternate content to be returned to client.
send_response()
setContext($context, $getpeer)
$context
- the registered object
$getpeer
- boolean; true means get printable peer address
setSelector($selector)
$selector
- the HTTP::Daemon::Threaded::IOSelector object