JdkHttpServer

constructor(backlog: Int, executor: Executor? = null, stopDelay: Int = 0, idleInterval: Int = 30, maxConnections: Int = -1, maxIdleConnections: Int = 200, drainAmount: Int = 65536, maxReqHeaders: Int = 200, maxReqTime: Int = -1, maxRspTime: Int = -1, nodelay: Boolean = false)

Parameters

backlog

.

executor

.

stopDelay

.

idleInterval

Maximum duration in seconds which an idle connection is kept open. This timer has an implementation specific granularity that may mean that idle connections are closed later than the specified interval. Values less than or equal to zero are mapped to* the default setting.

maxConnections

The maximum number of open connections at a time. This includes active and idle connections. If zero or negative, then no limit is enforced.

maxIdleConnections

The maximum number of idle connections at a time. If set to zero or a negative value then connections are closed after use.

drainAmount

The maximum number of bytes that will be automatically read and discarded from a request body that has not been completely consumed by its HttpHandler. If the number of remaining unread bytes are less than this limit then the connection will be put in the idle connection cache. If not, then it will be closed.

maxReqHeaders

The maximum number of header fields accepted in a request. If this limit is exceeded while the headers are being read, then the connection is terminated and the request ignored. If the value is less than or equal to zero, then the default value is used.

maxReqTime

The maximum time in milliseconds allowed to receive a request headers and body. In practice, the actual time is a function of request size, network speed, and handler processing delays. A value less than or equal to zero means the time is not limited. If the limit is exceeded then the connection is terminated and the handler will receive a IOException. This timer has an implementation specific granularity that may mean requests are aborted later than the specified interval.

maxRspTime

The maximum time in milliseconds allowed to receive a response headers and body. In practice, the actual time is a function of response size, network speed, and handler processing delays. A value less than or equal to zero means the time is not limited. If the limit is exceeded then the connection is terminated and the handler will receive a IOException. This timer has an implementation specific granularity that may mean responses are aborted later than the specified interval.

nodelay

If true, sets the TCP_NODELAY socket option on all incoming connections.


constructor()