HttpServerEngine

A base contract for HTTP server implementations that must be configurable by guest code.

The config property allows guest code to change the binding port, set a start callback, and adjust other backend-specific options as applicable.

The router property can be used to register route handlers from guest code.

Properties

Link copied to clipboard
abstract val config: HttpServerConfig

Configuration for this server engine, accessible by guest code.

Link copied to clipboard
abstract val router: HttpRouter

Router for this server engine, accessible by guest code and capable of registering route handlers.

Link copied to clipboard
abstract val running: Boolean

Whether the server is running and listening for connections.

Functions

Link copied to clipboard
abstract fun start()

Starts listening for connections.