Move from custom HTTP client to Async HTTP Client

The most significant advantage is that Velocity gets a well-tested
HTTP client implementation which also includes a connection pool,
allowing us to avoid the overhead of TCP and TLS handshakes upon each
login.

Unfortunately, Async HTTP Client does not work with the kqueue transport.
Since almost nobody runs a production Velocity server on macOS, we have
decided to remove kqueue support. The benefits that Async HTTP Client
provides outweigh the disadvantages of not having a macOS native transport.
macOS is adequately supported by the normal NIO transport.
This commit is contained in:
Andrew Steinborn
2019-07-26 01:29:43 -04:00
parent 7fde18c9f8
commit d1736bf94c
9 changed files with 97 additions and 309 deletions

View File

@@ -48,7 +48,6 @@ dependencies {
compile "io.netty:netty-handler:${nettyVersion}"
compile "io.netty:netty-transport-native-epoll:${nettyVersion}"
compile "io.netty:netty-transport-native-epoll:${nettyVersion}:linux-x86_64"
compile "io.netty:netty-transport-native-kqueue:${nettyVersion}:osx-x86_64"
compile "io.netty:netty-resolver-dns:${nettyVersion}"
compile "org.apache.logging.log4j:log4j-api:${log4jVersion}"
@@ -65,6 +64,8 @@ dependencies {
compile 'net.kyori:event-method-asm:3.0.0'
compile 'com.mojang:brigadier:1.0.15'
compile 'org.asynchttpclient:async-http-client:2.10.1'
testCompile "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
testCompile "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"