Skip to content

Home

com.hexagonkt.http.server / Server

Server

data class Server

A server that listen to HTTP connections on a port and address and route requests using a router.

TODO Write documentation.

Constructors

Name Summary
<init> Server(adapter:ServerPort= inject(), settings:Map<String, *> = SettingsManager.settings, block:Router.() ->Unit)
Creates a server with a router. It is a combination of Server and Router.Server(adapter:ServerPort, router:Router, settings:Map<String, *>)``Server(adapter:ServerPort= inject(), router:Router, settings:ServerSettings= ServerSettings())
A server that listen to HTTP connections on a port and address and route requests using a router.

Properties

Name Summary
contextRouter val contextRouter:Router
portName val portName:String
runtimePort val runtimePort:Int
settings val settings:ServerSettings

Functions

Name Summary
start fun start():Unit
started fun started():Boolean
stop fun stop():Unit