SUMMARY: CONSTR | METHOD | DETAIL: CONSTR | METHOD |
A threads::shared array is shared between this object and the WebClient objects so that WebClients can return themselves to the free list quickly; a future release may convert the freelist to a full object, in the event the allocate/free methods require a more complex process.
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.
Constructor Summary |
---|
new(AptTimeout => value, Port => value, MaxClients => value, LogLevel => value, EventLogger => value, WebLogger => value, Handlers => value, UserAuth => value, SessionCache => value, InactivityTimer => value, ContentParams => value, DocRoot => value, ProductTokens => value, MediaTypes => value, SelectInterval => value)
Opens the HTTPD listener socket and creates its selector |
Method Summary |
---|
close()
Closes the listen socket and stops all the WebClient threads |
getListenInterval()
Get IO::Select() interval |
getSocket()
Return the listener socket |
get_simplex_methods()
Overrides Thread::Apartment::Server::get_simplex_methods() |
handleSocketError()
Deprecated. 1 |
handleSocketEvent()
Handle listen socket events |
run()
Thread::Apartment::MuxServer::run() implementation |
setListenInterval($interval)
Set IO::Select() interval |
setLogLevel($level)
Set log level |
Constructor Details |
---|
new(AptTimeout => value, Port => value, MaxClients => value, LogLevel => value, EventLogger => value, WebLogger => value, Handlers => value, UserAuth => value, SessionCache => value, InactivityTimer => value, ContentParams => value, DocRoot => value, ProductTokens => value, MediaTypes => value, SelectInterval => value)
Note that the following parameters are recognized by HTTP::Daemon::Threaded and/or HTTP::Daemon::Threaded::WebClient, but applications may supply additional parameter key/value pairs which will be provided to the constructor for any specified HTTP::Daemon::Threaded::ContentParams class.
AptTimeout
=> (optional) Thread::Apartment proxy return timeout
Port
=> (optional) TCP listen port; default 80.
MaxClients
=> (optional) max number of client handlers to spawn;
default 5
LogLevel
=> (optional) logging level; 1 => errors only; 2 => errors and warnings only; 3 => errors, warnings,
and info messages; default 1
EventLogger
=> (optional) Instance of a HTTP::Daemon::Threaded::Logger to receive
event notifications (except for web requests)
WebLogger
=> (optional) Instance of a HTTP::Daemon::Threaded::Logger to receive
web request notifications
Handlers
=> (required) URI handler map; arrayref mapping URI regex's to handler package names
UserAuth
=> (optional) instance of a subclass of HTTP::Daemon::Threaded::Auth (not yet supported)
SessionCache
=> (optional) instance of a subclass of HTTP::Daemon::Threaded::SessionCache
to be used to create/manage sessions
InactivityTimer
=> (optional) number of seconds a WebClient waits before disconnecting
an idle connection; default 10 minutes
ContentParams
=> (optional) name of concrete implementation of HTTP::Daemon::Threaded::ContentParams
DocRoot
=> (optional) root directory for default file based content handler
ProductTokens
=> (optional) product token string to return to client; default
is 'HTTP::Daemon::Threaded/MediaTypes
=> (optional) hashref mapping 'Content-Type' specifications to
file qualifier strings. Values may be either a single string literal, or
SelectInterval
=> (optional) seconds to wait in select()'s on sockets. May be fractional; default 0.5
Method Details |
---|
close()
getListenInterval()
getSocket()
get_simplex_methods()
handleSocketError()
handleSocketEvent()
run()
setListenInterval($interval)
$interval
- new interval; fractional number of seconds
setLogLevel($level)
$level
- new log level