vertx / io.vertx.kotlin.core.http / httpServerOptionsOf

# httpServerOptionsOf

`fun httpServerOptionsOf(acceptBacklog: Int? = null, acceptUnmaskedFrames: Boolean? = null, alpnVersions: Iterable<HttpVersion>? = null, clientAuth: ClientAuth? = null, clientAuthRequired: Boolean? = null, compressionLevel: Int? = null, compressionSupported: Boolean? = null, crlPaths: Iterable<String>? = null, crlValues: Iterable<Buffer>? = null, decoderInitialBufferSize: Int? = null, decompressionSupported: Boolean? = null, enabledCipherSuites: Iterable<String>? = null, enabledSecureTransportProtocols: Iterable<String>? = null, handle100ContinueAutomatically: Boolean? = null, host: String? = null, http2ConnectionWindowSize: Int? = null, idleTimeout: Int? = null, idleTimeoutUnit: TimeUnit? = null, initialSettings: Http2Settings? = null, jdkSslEngineOptions: JdkSSLEngineOptions? = null, keyStoreOptions: JksOptions? = null, logActivity: Boolean? = null, maxChunkSize: Int? = null, maxFormAttributeSize: Int? = null, maxHeaderSize: Int? = null, maxInitialLineLength: Int? = null, maxWebSocketFrameSize: Int? = null, maxWebSocketMessageSize: Int? = null, maxWebsocketFrameSize: Int? = null, maxWebsocketMessageSize: Int? = null, openSslEngineOptions: OpenSSLEngineOptions? = null, pemKeyCertOptions: PemKeyCertOptions? = null, pemTrustOptions: PemTrustOptions? = null, perFrameWebSocketCompressionSupported: Boolean? = null, perFrameWebsocketCompressionSupported: Boolean? = null, perMessageWebSocketCompressionSupported: Boolean? = null, perMessageWebsocketCompressionSupported: Boolean? = null, pfxKeyCertOptions: PfxOptions? = null, pfxTrustOptions: PfxOptions? = null, port: Int? = null, receiveBufferSize: Int? = null, reuseAddress: Boolean? = null, reusePort: Boolean? = null, sendBufferSize: Int? = null, sni: Boolean? = null, soLinger: Int? = null, ssl: Boolean? = null, sslHandshakeTimeout: Long? = null, sslHandshakeTimeoutUnit: TimeUnit? = null, tcpCork: Boolean? = null, tcpFastOpen: Boolean? = null, tcpKeepAlive: Boolean? = null, tcpNoDelay: Boolean? = null, tcpQuickAck: Boolean? = null, trafficClass: Int? = null, trustStoreOptions: JksOptions? = null, useAlpn: Boolean? = null, usePooledBuffers: Boolean? = null, webSocketAllowServerNoContext: Boolean? = null, webSocketClosingTimeout: Int? = null, webSocketCompressionLevel: Int? = null, webSocketPreferredClientNoContext: Boolean? = null, webSocketSubProtocols: Iterable<String>? = null, websocketAllowServerNoContext: Boolean? = null, websocketCompressionLevel: Int? = null, websocketPreferredClientNoContext: Boolean? = null, websocketSubProtocols: String? = null): HttpServerOptions`

A function providing a DSL for building io.vertx.core.http.HttpServerOptions objects.

Represents options used by an io.vertx.core.http.HttpServer instance

### Parameters

`acceptBacklog` - Set the accept back log

`acceptUnmaskedFrames` - Set true when the server accepts unmasked frame. As default Server doesn't accept unmasked frame, you can bypass this behaviour (RFC 6455) setting true. It's set to false as default.

`alpnVersions` - Set the list of protocol versions to provide to the server during the Application-Layer Protocol Negotiatiation.

`clientAuth` - Set whether client auth is required

`clientAuthRequired` - Set whether client auth is required

`compressionLevel` - This method allows to set the compression level to be used in http1.x/2 response bodies when compression support is turned on (@see setCompressionSupported) and the client advertises to support deflate/gzip compression in the Accept-Encoding header default value is : 6 (Netty legacy) The compression level determines how much the data is compressed on a scale from 1 to 9, where '9' is trying to achieve the maximum compression ratio while '1' instead is giving priority to speed instead of compression ratio using some algorithm optimizations and skipping pedantic loops that usually gives just little improvements While one can think that best value is always the maximum compression ratio, there's a trade-off to consider: the most compressed level requires the most computational work to compress/decompress data, e.g. more dictionary lookups and loops. E.g. you have it set fairly high on a high-volume website, you may experience performance degradation and latency on resource serving due to CPU overload, and, however - as the computational work is required also client side while decompressing - setting an higher compression level can result in an overall higher page load time especially nowadays when many clients are handled mobile devices with a low CPU profile. see also: http://www.gzip.org/algorithm.txt

`compressionSupported` - Set whether the server should support gzip/deflate compression (serving compressed responses to clients advertising support for them with Accept-Encoding header)

`crlPaths` - Add a CRL path

`crlValues` - Add a CRL value

`decoderInitialBufferSize` - Set the initial buffer size for the HTTP decoder

`decompressionSupported` - Set whether the server supports decompression

`enabledCipherSuites` - Add an enabled cipher suite, appended to the ordered suites.

`enabledSecureTransportProtocols` - Sets the list of enabled SSL/TLS protocols.

`handle100ContinueAutomatically` - Set whether 100 Continue should be handled automatically

`host` - Set the host

`http2ConnectionWindowSize` - Set the default HTTP/2 connection window size. It overrides the initial window size set by io.vertx.core.http.Http2Settings, so the connection window size is greater than for its streams, in order the data throughput. A value of -1 reuses the initial window size setting.

`idleTimeout` - Set the idle timeout, default time unit is seconds. Zero means don't timeout. This determines if a connection will timeout and be closed if no data is received within the timeout. If you want change default time unit, use io.vertx.core.http.HttpServerOptions

`idleTimeoutUnit` - Set the idle timeout unit. If not specified, default is seconds.

`initialSettings` - Set the HTTP/2 connection settings immediatly sent by the server when a client connects.

`jdkSslEngineOptions` -

`keyStoreOptions` - Set the key/cert options in jks format, aka Java keystore.

`logActivity` - Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.

`maxChunkSize` - Set the maximum HTTP chunk size that io.vertx.core.http.HttpServerRequest will receive

`maxFormAttributeSize` - Set the maximum size of a form attribute. Set to -1 to allow unlimited length

`maxHeaderSize` - Set the maximum length of all headers for HTTP/1.x .

`maxInitialLineLength` - Set the maximum length of the initial line for HTTP/1.x (e.g. "GET / HTTP/1.0")

`maxWebSocketFrameSize` - Set the maximum WebSocket frames size

`maxWebSocketMessageSize` - Set the maximum WebSocket message size

`maxWebsocketFrameSize` - Set the maximum WebSocket frames size

`maxWebsocketMessageSize` - Set the maximum WebSocket message size

`openSslEngineOptions` -

`pemKeyCertOptions` - Set the key/cert store options in pem format.

`pemTrustOptions` - Set the trust options in pem format

`perFrameWebSocketCompressionSupported` - Enable or disable support for the WebSocket per-frame deflate compression extension.

`perFrameWebsocketCompressionSupported` - Enable or disable support for the WebSocket per-frame deflate compression extension.

`perMessageWebSocketCompressionSupported` - Enable or disable support for WebSocket per-message deflate compression extension.

`perMessageWebsocketCompressionSupported` - Enable or disable support for WebSocket per-message deflate compression extension.

`pfxKeyCertOptions` - Set the key/cert options in pfx format.

`pfxTrustOptions` - Set the trust options in pfx format

`port` - Set the port

`receiveBufferSize` - Set the TCP receive buffer size

`reuseAddress` - Set the value of reuse address

`reusePort` - Set the value of reuse port. This is only supported by native transports.

`sendBufferSize` - Set the TCP send buffer size

`sni` - Set whether the server supports Server Name Indiciation

`soLinger` - Set whether SO_linger keep alive is enabled

`ssl` - Set whether SSL/TLS is enabled

`sslHandshakeTimeout` - Set the SSL handshake timeout, default time unit is seconds.

`sslHandshakeTimeoutUnit` - Set the SSL handshake timeout unit. If not specified, default is seconds.

`tcpCork` - Enable the TCP_CORK option - only with linux native transport.

`tcpFastOpen` - Enable the TCP_FASTOPEN option - only with linux native transport.

`tcpKeepAlive` - Set whether TCP keep alive is enabled

`tcpNoDelay` - Set whether TCP no delay is enabled

`tcpQuickAck` - Enable the TCP_QUICKACK option - only with linux native transport.

`trafficClass` - Set the value of traffic class

`trustStoreOptions` - Set the trust options in jks format, aka Java truststore

`useAlpn` - Set the ALPN usage.

`usePooledBuffers` - Set whether Netty pooled buffers are enabled

`webSocketAllowServerNoContext` - Set whether the WebSocket server will accept the server_no_context_takeover parameter of the per-message deflate compression extension offered by the client.

`webSocketClosingTimeout` - Set the amount of time a server WebSocket will wait until it closes the TCP connection after sending a close frame. When a server closes a WebSocket, it should wait the client close frame to close the TCP connection. This timeout will close the TCP connection on the server when it expires. When the TCP connection is closed receiving the close frame, the io.vertx.core.http.WebSocket instead of the io.vertx.core.http.WebSocket will be called. Set to 0L closes the TCP connection immediately after sending the close frame. Set to a negative value to disable it.

`webSocketCompressionLevel` - Set the WebSocket compression level.

`webSocketPreferredClientNoContext` - Set whether the WebSocket server will accept the client_no_context_takeover parameter of the per-message deflate compression extension offered by the client.

`webSocketSubProtocols` - Set the WebSocket list of sub-protocol supported by the server.

`websocketAllowServerNoContext` - Set whether the WebSocket server will accept the server_no_context_takeover parameter of the per-message deflate compression extension offered by the client.

`websocketCompressionLevel` - Set the WebSocket compression level.

`websocketPreferredClientNoContext` - Set whether the WebSocket server will accept the client_no_context_takeover parameter of the per-message deflate compression extension offered by the client.

`websocketSubProtocols` - Set the WebSocket sub-protocols supported by the server.