KtorServletService

constructor(port: Int, servletGroup: HttpServletGroup, initKtor: Application.() -> Unit = {}, host: String? = null, filters: List<Filter> = [], initBlock: KtorServletService.() -> Unit = {})

Parameters

port

The HTTP port for the Ktor server.

servletGroup

The HttpServletGroup containing servlets to register as routes.

initKtor

An optional Ktor Application configuration block applied before routing.

host

The interface to bind to. The default, null, binds 127.0.0.1, so only local clients can connect; use "0.0.0.0" to accept connections on every interface.

filters

The servlet filters every request for a servlet passes through, in order, before it reaches it.

initBlock

An optional initialization block invoked after the service listener is registered.