- Index
- »
- wisp
- »
- WispService
type
WispService
src
const class WispService : Obj, Service
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
constructors
make |
Constructor with it-block |
---|
fields
addr |
Which IpAddr to bind to or null for the default. |
---|---|
errMod |
WebMod which is called on internal server error to return an 500 error response. |
extraResHeaders |
Map of HTTP headers to include in every response. |
httpPort |
Well known TCP port for HTTP traffic. |
httpsPort |
Well known TCP port for HTTPS traffic. |
maxThreads |
Max number of threads which are used for concurrent web request processing. |
root |
Root WebMod used to service requests. |
sessionCookieName |
Cookie name to use for built-in session management. |
sessionStore |
Pluggable interface for managing web session state. |
socketConfig |
The |
methods
Slot Details
addr
errMod
src
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"]
. 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
httpPort
httpsPort
make
maxThreads
onStart
onStop
root
sessionCookieName
sessionStore
src
const WispSessionStore sessionStore := MemWispSessionStore.<ctor>(this)
Pluggable interface for managing web session state. Default implementation stores sessions in main memory.
socketConfig
src
const SocketConfig socketConfig := SocketConfig.cur
The SocketConfig
to use for creating sockets