File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
http4s-server-blaze/src/main/scala/com/avast/sst/http4s/server Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,11 @@ object Http4sBlazeServerConfig {
2727
2828 def localhost8080 : Http4sBlazeServerConfig = Http4sBlazeServerConfig (" 127.0.0.1" , 8080 )
2929
30- final case class SocketOptions (tcpNoDelay : Boolean = true )
30+ final case class SocketOptions (
31+ tcpNoDelay : Boolean = true ,
32+ soKeepAlive : Boolean = true ,
33+ soReuseAddr : Boolean = true ,
34+ soReusePort : Boolean = true
35+ )
3136
3237}
Original file line number Diff line number Diff line change @@ -42,6 +42,9 @@ object Http4sBlazeServerModule {
4242 .withConnectorPoolSize(config.connectorPoolSize)
4343 .withMaxConnections(config.maxConnections)
4444 .withChannelOption[java.lang.Boolean ](StandardSocketOptions .TCP_NODELAY , config.socketOptions.tcpNoDelay)
45+ .withChannelOption[java.lang.Boolean ](StandardSocketOptions .SO_KEEPALIVE , config.socketOptions.soKeepAlive)
46+ .withChannelOption[java.lang.Boolean ](StandardSocketOptions .SO_REUSEADDR , config.socketOptions.soReuseAddr)
47+ .withChannelOption[java.lang.Boolean ](StandardSocketOptions .SO_REUSEPORT , config.socketOptions.soReusePort)
4548 .resource
4649 } yield server
4750 }
You can’t perform that action at this time.
0 commit comments