const class wisp::WispService
sys::Obj wisp::WispService : sys::Service
Simple web server services HTTP requests on a configured port to a top-level root WebMod. A given instance of WispService can be only be used through one start/stop lifecycle.
Example:
WispService { port = 8080; root = MyWebMod() }.start
- addr
-
const IpAddr? addr := null
Which IpAddr to bind to or null for the default.
- errMod
-
const WebMod errMod := initErrMod
WebMod which is called on internal server error to return an 500 error response. The exception raised is available in
req.stash["err"]
. TheonService
method is called after clearing all headers and setting the response code to 500. The default error mod may be configured viaerrMod
property in etc/web/config.props. - make
-
new make(|This|? f := null)
Constructor with it-block
- maxThreads
-
const Int maxThreads := 500
Max number of threads which are used for concurrent web request processing.
- onStart
-
virtual override Void onStart()
- onStop
-
virtual override Void onStop()
- port
-
const Int port := 80
Well known TCP port for HTTP traffic.
- root
-
const WebMod root := WispDefaultRootMod.<ctor>()
Root WebMod used to service requests.
- sessionStore
-
const WispSessionStore sessionStore := MemWispSessionStore.<ctor>()
Pluggable interface for managing web session state. Default implementation stores sessions in main memory.