const class wisp::WispService

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

Source

Simple web server services HTTP/HTTPS requests to a top-level root WebMod. A given instance of WispService can be only be used through one start/stop lifecycle.

Example:

WispService { httpPort = 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.

extraResHeaders

const Str:Str extraResHeaders := initExtraResHeaders

Source

Map of HTTP headers to include in every response. These are initialized from etc/web/config.props with the key "extraResHeaders" as a set of "key:value" pairs separated by semicolons.

httpPort

const Int? httpPort := null

Source

Well known TCP port for HTTP traffic. The port is enabled if non-null and disabled if null.

httpsPort

const Int? httpsPort := null

Source

Well known TCP port for HTTPS traffic. The port is enabled if non-null and disabled if null. If the http and https ports are both non-null then all http traffic will be redirected to the https port.

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

root

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

Source

Root WebMod used to service requests.

sessionCookieName

const Str sessionCookieName := ...

Source

Cookie name to use for built-in session management. Initialized from etc/web/config.props with the key "sessionCookieName" otherwise defaults to "fanws"

sessionStore

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

Source

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

socketConfig

const SocketConfig socketConfig := SocketConfig.cur

Source

The SocketConfig to use for creating sockets