const class wisp::WispService

sys::Obj
  wisp::WispService : sys::Service

Source

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

Source

Which IpAddr to bind to or null for the default.

errMod

const WebMod errMod := initErrMod

Source

WebMod which is called on internal server error to return an 500 error response. The exception raised is available in req.stash["err"]. The onService method is called after clearing all headers and setting the response code to 500. The default error mod may be configured via errMod property in etc/web/config.props.

make

new make(|This|? f := null)

Source

Constructor with it-block

maxThreads

const Int maxThreads := 500

Source

Max number of threads which are used for concurrent web request processing.

onStart

virtual override Void onStart()

Source

onStop

virtual override Void onStop()

Source

port

const Int port := 80

Source

Well known TCP port for HTTP traffic.

root

const WebMod root := WispDefaultRootMod.<ctor>()

Source

Root WebMod used to service requests.

sessionStore

const WispSessionStore sessionStore := MemWispSessionStore.<ctor>()

Source

Pluggable interface for managing web session state. Default implementation stores sessions in main memory.