Package-level declarations

This package defines server interfaces for HTTP server adapters.


Link copied to clipboard
data class HttpServer(adapter: HttpServerPort, val handler: HttpHandler, val settings: HttpServerSettings = HttpServerSettings()) : Closeable

Server that listen to HTTP connections on a port and address and route requests to handlers.

Link copied to clipboard

Toolkit feature that may or may not be implemented by a server adapter.

Link copied to clipboard
interface HttpServerPort

Server instance of one kind.

Link copied to clipboard
data class HttpServerSettings(val bindAddress: InetAddress = InetAddress.getLoopbackAddress(), val bindPort: Int = 2010, val contextPath: String = "", val protocol: HttpProtocol = HTTP, val sslSettings: SslSettings? = null, val banner: String? = HttpServer.banner, val zip: Boolean = false)

Holds server settings info.


Link copied to clipboard
fun serve(adapter: HttpServerPort, handler: HttpHandler, settings: HttpServerSettings = HttpServerSettings()): HttpServer
fun serve(adapter: HttpServerPort, settings: HttpServerSettings = HttpServerSettings(), block: HandlerBuilder.() -> Unit): HttpServer

Create a server and start it.