NettyConfig

sttp.tapir.server.netty.NettyConfig
See theNettyConfig companion object
case class NettyConfig(host: String, port: Int, shutdownEventLoopGroupOnClose: Boolean, maxContentLength: Option[Int], maxConnections: Option[Int], socketBacklog: Int, requestTimeout: Option[FiniteDuration], connectionTimeout: Option[FiniteDuration], socketTimeout: Option[FiniteDuration], lingerTimeout: Option[FiniteDuration], socketKeepAlive: Boolean, addLoggingHandler: Boolean, sslContext: Option[SslContext], eventLoopConfig: EventLoopConfig, socketConfig: NettySocketConfig, initPipeline: NettyConfig => (ChannelPipeline, ChannelHandler) => Unit)

Netty configuration, used by NettyFutureServer and other server implementations to configure the networking layer, the Netty processing pipeline, and start & stop the server.

Value parameters

addLoggingHandler

Should a low-level logging handler, io.netty.handler.logging.LoggingHandler, be added to the Netty pipeline. This is independent from the logging interceptor configured through the server options.

connectionTimeout

Specifies the maximum duration within which a connection between a client and a server must be established.

initPipeline

The function to create the Netty pipeline, using the configuration instance, the pipeline created so far, and the handler which contains tapir's server processing logic.

lingerTimeout

Sets the delay for which the Netty waits, while data is being transmitted, before closing a socket after receiving a call to close the socket

maxConnections

The maximum number of concurrent connections allowed by the server. Any connections above this limit will be closed right after they are opened.

maxContentLength

The max content length passed to the io.netty.handler.codec.http.HttpObjectAggregator handler.

requestTimeout

The maximum duration, to wait for a response before considering the request timed out.

socketTimeout

Refers to the duration for which a socket operation will wait before throwing an exception if no data is received or sent. Socket timeout also effectively establishes a read timeout.

Attributes

Throws
ReadTimeoutException

when no data is read from Netty within the specified period of time for a request.

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product