CloudburstMC / Network

Network components
Apache License 2.0
45 stars 41 forks source link

Connecting times out #34

Closed RaphiMC closed 2 months ago

RaphiMC commented 1 year ago

When trying to connect to lootmc.com the connection times out. Connecting using a bedrock client works fine. Minimal reproduceable example

    public static void main(String[] args) throws Throwable {
        System.out.println("connecting");
        new Bootstrap()
                .channelFactory(RakChannelFactory.client(NioDatagramChannel.class))
                .group(new NioEventLoopGroup())
                .option(RakChannelOption.RAK_PROTOCOL_VERSION, 11)
                .option(RakChannelOption.RAK_CONNECT_TIMEOUT, 4_000L)
                .option(RakChannelOption.RAK_SESSION_TIMEOUT, 30_000L)
                .option(RakChannelOption.RAK_GUID, ThreadLocalRandom.current().nextLong())
                .handler(new BedrockClientInitializer() {
                    @Override
                    protected void initSession(BedrockClientSession session) {
                        System.out.println("connected");
                        session.setCodec(Bedrock_v594.CODEC);
                        session.setPacketHandler(new BedrockPacketHandler() {
                        });
                    }
                })
                .connect(new InetSocketAddress("lootmc.com", 19132))
                .syncUninterruptibly();
    }

In this example "connected" is never printed