update deps, tcp fastopen

This commit is contained in:
creeper123123321 2021-10-17 10:42:34 -03:00
parent 822795639a
commit f0976df983
4 changed files with 5 additions and 2 deletions

View File

@ -67,9 +67,9 @@ dependencies {
implementation("com.viaversion:viabackwards:$vbVer") { isTransitive = false }
implementation("com.github.ViaVersion.ViaRewind:viarewind-all:$vrVer") { isTransitive = false }
implementation("io.netty:netty-all:4.1.68.Final")
implementation("io.netty:netty-all:4.1.69.Final")
implementation("io.netty:netty-tcnative-boringssl-static:2.0.44.Final")
implementation("io.netty.incubator:netty-incubator-transport-native-io_uring:0.0.8.Final:linux-x86_64")
implementation("io.netty.incubator:netty-incubator-transport-native-io_uring:0.0.9.Final:linux-x86_64")
implementation("com.google.guava:guava:31.0.1-jre")
implementation("com.velocitypowered:velocity-native:3.0.1")

View File

@ -117,6 +117,7 @@ object AspirinServer {
.childOption(ChannelOption.WRITE_BUFFER_WATER_MARK, bufferWaterMark)
.childOption(ChannelOption.IP_TOS, 0x18)
.childOption(ChannelOption.TCP_NODELAY, true)
.childOption(ChannelOption.TCP_FASTOPEN, 32)
.bind(InetAddress.getByName(VIAaaSConfig.bindAddress), VIAaaSConfig.port)
ktorServer = embeddedServer(Netty, commandLineEnvironment(args)) {}.start(false)

View File

@ -44,6 +44,7 @@ object ProtocolDetector {
.resolver(NoopAddressResolverGroup.INSTANCE)
.channelFactory(channelSocketFactory(AspirinServer.childLoop))
.option(ChannelOption.TCP_NODELAY, true)
.option(ChannelOption.TCP_FASTOPEN_CONNECT, true)
.option(ChannelOption.IP_TOS, 0x18)
.handler(object : ChannelInitializer<Channel>() {
override fun initChannel(channel: Channel) {

View File

@ -40,6 +40,7 @@ private suspend fun createBackChannel(
.option(ChannelOption.WRITE_BUFFER_WATER_MARK, AspirinServer.bufferWaterMark)
.option(ChannelOption.IP_TOS, 0x18)
.option(ChannelOption.TCP_NODELAY, true)
.option(ChannelOption.TCP_FASTOPEN_CONNECT, true)
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 10_000) // We need to show the error before the client timeout
.resolver(NoopAddressResolverGroup.INSTANCE)
.connect(socketAddr)