Skip to content

Commit

Permalink
Batch ping/request network settings
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Castle <[email protected]>
  • Loading branch information
Kas-tle committed Sep 23, 2024
1 parent 8de7a22 commit fea86ff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion network
Submodule network updated 14 files
+3 −0 transport-raknet/src/main/java/org/cloudburstmc/netty/channel/raknet/RakConstants.java
+16 −2 transport-raknet/src/main/java/org/cloudburstmc/netty/channel/raknet/RakServerChannel.java
+31 −1 transport-raknet/src/main/java/org/cloudburstmc/netty/channel/raknet/config/DefaultRakClientConfig.java
+8 −2 transport-raknet/src/main/java/org/cloudburstmc/netty/channel/raknet/config/RakChannelMetrics.java
+13 −0 transport-raknet/src/main/java/org/cloudburstmc/netty/channel/raknet/config/RakChannelOption.java
+2 −17 transport-raknet/src/main/java/org/cloudburstmc/netty/channel/raknet/packet/EncapsulatedPacket.java
+1 −21 transport-raknet/src/main/java/org/cloudburstmc/netty/channel/raknet/packet/RakDatagramPacket.java
+2 −1 transport-raknet/src/main/java/org/cloudburstmc/netty/handler/codec/raknet/client/RakClientOfflineHandler.java
+24 −8 ...-raknet/src/main/java/org/cloudburstmc/netty/handler/codec/raknet/client/RakClientOnlineInitialHandler.java
+3 −1 ...ort-raknet/src/main/java/org/cloudburstmc/netty/handler/codec/raknet/client/RakClientProxyRouteHandler.java
+2 −2 transport-raknet/src/main/java/org/cloudburstmc/netty/handler/codec/raknet/common/RakDatagramCodec.java
+17 −9 transport-raknet/src/main/java/org/cloudburstmc/netty/handler/codec/raknet/common/RakSessionCodec.java
+31 −27 transport-raknet/src/main/java/org/cloudburstmc/netty/handler/codec/raknet/server/RakServerOfflineHandler.java
+10 −56 transport-raknet/src/main/java/org/cloudburstmc/netty/util/FastBinaryMinHeap.java
2 changes: 2 additions & 0 deletions src/main/java/org/cloudburstmc/proxypass/ProxyPass.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ public void newClient(InetSocketAddress socketAddress, Consumer<ProxyClientSessi
.option(RakChannelOption.RAK_IP_DONT_FRAGMENT, true)
.option(RakChannelOption.RAK_MTU_SIZES, new Integer[]{1492, 1200, 576})
.option(RakChannelOption.RAK_CLIENT_INTERNAL_ADDRESSES, 20)
.option(RakChannelOption.RAK_TIME_BETWEEN_SEND_CONNECTION_ATTEMPTS_MS, 500)
.option(RakChannelOption.RAK_CLIENT_BEDROCK_PROTOCOL_VERSION, PROTOCOL_VERSION)
.handler(new BedrockChannelInitializer<ProxyClientSession>() {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,14 @@ private void initializeOnlineProxySession() {
login.setExtra(skinData);
login.setProtocolVersion(ProxyPass.PROTOCOL_VERSION);

// RequestNetworkSettingsPacket packet = new RequestNetworkSettingsPacket();
// packet.setProtocolVersion(ProxyPass.PROTOCOL_VERSION);
// downstream.sendPacketImmediately(packet);
// this.player.logger.logPacket(this.session, packet, true);

downstream.setPacketHandler(new DownstreamInitialPacketHandler(downstream, proxySession, this.proxy, login));
downstream.setLogging(true);

RequestNetworkSettingsPacket packet = new RequestNetworkSettingsPacket();
packet.setProtocolVersion(ProxyPass.PROTOCOL_VERSION);
downstream.sendPacketImmediately(packet);
this.player.logger.logPacket(this.session, packet, true);

//SkinUtils.saveSkin(proxySession, this.skinData);
});
}
Expand Down

0 comments on commit fea86ff

Please sign in to comment.