Skip to content

Commit

Permalink
Disable active migration and increase payload size
Browse files Browse the repository at this point in the history
  • Loading branch information
dries-c committed Apr 12, 2024
1 parent d8e6433 commit a5e8f95
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.nethergames.proxytransport.impl.TransportChannelInitializer;

import java.net.InetSocketAddress;
import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;

Expand All @@ -36,7 +36,7 @@ public class QuicTransportServerInfo extends ServerInfo {
.serverInfoFactory(QuicTransportServerInfo::new)
.register();

private final HashMap<InetSocketAddress, Future<QuicChannel>> serverConnections = new HashMap<>();
private final ConcurrentHashMap<InetSocketAddress, Future<QuicChannel>> serverConnections = new ConcurrentHashMap<>();

public QuicTransportServerInfo(String serverName, InetSocketAddress address, InetSocketAddress publicAddress) {
super(serverName, address, publicAddress);
Expand Down Expand Up @@ -86,9 +86,12 @@ private Future<QuicChannel> createServerConnection(EventLoopGroup eventLoopGroup
QuicSslContext sslContext = QuicSslContextBuilder.forClient().trustManager(InsecureTrustManagerFactory.INSTANCE).applicationProtocols("ng").build();
ChannelHandler codec = new QuicClientCodecBuilder()
.sslContext(sslContext)
.maxIdleTimeout(5000, TimeUnit.MILLISECONDS)
.maxIdleTimeout(2000, TimeUnit.MILLISECONDS)
.initialMaxData(10000000)
.initialMaxStreamDataBidirectionalLocal(1000000)
.maxRecvUdpPayloadSize(1350)
.maxSendUdpPayloadSize(1350)
.activeMigration(false)
.build();

new Bootstrap()
Expand Down

0 comments on commit a5e8f95

Please sign in to comment.