Skip to content

Commit

Permalink
Merge pull request #674 from hexagonkt/develop
Browse files Browse the repository at this point in the history
Support extra configuration in Netty Epoll adapter
  • Loading branch information
jaguililla committed Nov 5, 2023
2 parents bcb8edb + 6a84138 commit 0025dfd
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ org.gradle.warning.mode=all
org.gradle.console=plain

# Gradle
version=3.4.2
version=3.4.3
group=com.hexagonkt
description=The atoms of your platform

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ open class NettyServerAdapter(
soKeepAlive = true,
shutdownQuietSeconds = 0,
shutdownTimeoutSeconds = 0,
keepAliveHandler = true,
httpAggregatorHandler = true,
chunkedHandler = true,
enableWebsockets = true,
)

override fun runtimePort(): Int =
Expand Down
4 changes: 2 additions & 2 deletions http/http_server_netty_epoll/api/http_server_netty_epoll.api
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
public final class com/hexagonkt/http/server/netty/epoll/NettyEpollServerAdapter : com/hexagonkt/http/server/netty/NettyServerAdapter {
public fun <init> ()V
public fun <init> (IIIIZZ)V
public synthetic fun <init> (IIIIZZILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun <init> (IIIIZZJJZZZZ)V
public synthetic fun <init> (IIIIZZJJZZZZILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun groupSupplier (I)Lio/netty/channel/MultithreadEventLoopGroup;
public fun serverBootstrapSupplier (Lio/netty/channel/MultithreadEventLoopGroup;Lio/netty/channel/MultithreadEventLoopGroup;)Lio/netty/bootstrap/ServerBootstrap;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,29 @@ class NettyEpollServerAdapter(
private val soBacklog: Int = 4 * 1_024,
private val soReuseAddr: Boolean = true,
private val soKeepAlive: Boolean = true,
shutdownQuietSeconds: Long = 0,
shutdownTimeoutSeconds: Long = 0,
keepAliveHandler: Boolean = true,
httpAggregatorHandler: Boolean = true,
chunkedHandler: Boolean = true,
enableWebsockets: Boolean = true,
) : NettyServerAdapter(
bossGroupThreads,
workerGroupThreads,
executorThreads,
soBacklog,
soReuseAddr,
soKeepAlive,
shutdownQuietSeconds,
shutdownTimeoutSeconds,
keepAliveHandler,
httpAggregatorHandler,
chunkedHandler,
enableWebsockets,
) {

constructor() : this(1, 0, Jvm.cpuCount * 2, 4 * 1_024, true, true)
constructor() :
this(1, 0, Jvm.cpuCount * 2, 4 * 1_024, true, true, 0, 0, true, true, true, true)

override fun groupSupplier(it: Int): MultithreadEventLoopGroup =
EpollEventLoopGroup(it)
Expand Down

0 comments on commit 0025dfd

Please sign in to comment.