AcceptorOptions

TCP server socket options

Properties

Link copied to clipboard
var backlogSize: Int = 511

Represents TCP server socket backlog size. When a client attempts to connect, the request is added to the so called backlog until it will be accepted. Once accept() is invoked, a client socket is removed from the backlog. If the backlog is too small, it may overflow and upcoming requests will be rejected by the underlying TCP implementation (usually with RST frame that usually causes "connection reset by peer" error on the opposite side).

Link copied to clipboard
var reuseAddress: Boolean = false

SO_REUSEADDR option

Link copied to clipboard
var reusePort: Boolean = false

SO_REUSEPORT option, may not work with old JDK (will be silently ignored)

Link copied to clipboard

ToS value, TypeOfService.UNDEFINED by default, may not work with old JDK (will be silently ignored)