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
Content copied to clipboard
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
Content copied to clipboard
Implements HttpServerPort using Netty Channel.
Functions
Link copied to clipboard
fun serve(settings: HttpServerSettings = HttpServerSettings(), block: ServerBuilder.() -> Unit): HttpServer
Content copied to clipboard
fun serve(settings: HttpServerSettings = HttpServerSettings(), handlers: List<ServerHandler>): HttpServer
Content copied to clipboard
Create a Netty server and start it. It is a shortcut to avoid passing the adapter.