Package com.hexagonkt.http.server.netty

Code implementing the Netty HTTP server adapter.

Types

Link copied to clipboard
class NettyRequestAdapter(    methodName: HttpMethod,     req: FullHttpRequest,     val certificateChain: List<X509Certificate>,     address: InetSocketAddress) : HttpServerRequestPort
Link copied to clipboard
open class NettyServerAdapter(    bossGroupThreads: Int = 1,     workerGroupThreads: Int = 0,     executorThreads: Int = Jvm.cpuCount * 2,     soBacklog: Int = 4 * 1_024,     soReuseAddr: Boolean = true,     soKeepAlive: Boolean = true,     shutdownQuietSeconds: Long = 0,     shutdownTimeoutSeconds: Long = 0) : HttpServerPort

Implements HttpServerPort using Netty Channel.

Functions

Link copied to clipboard
fun serve(settings: HttpServerSettings = HttpServerSettings(), block: ServerBuilder.() -> Unit): HttpServer
fun serve(settings: HttpServerSettings = HttpServerSettings(), handlers: List<ServerHandler>): HttpServer

Create a Netty server and start it. It is a shortcut to avoid passing the adapter.