Home

port_http_server / 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.

Constructors

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

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