java-Kcp
java-Kcp copied to clipboard
基于java的netty实现的可靠udp网络库(kcp算法),包含fec实现,可用于游戏,视频,加速等业务
 应该增加相关conv值得判断拦截, 否则会造成多客户端都是conv值为0的情况,不能存储对应链接 修改后: 
在一个pc上测试,运行两个KcpRttExampleClient,连接KcpRttExampleServer ScheduleTask,ReadTask,WriteTask其实都是一个线程在运行,都是串行在操作,这设计是为何?
2台pc测试,一台运行KcpRttExampleServer KcpRttExampleServer kcpRttExampleServer = new KcpRttExampleServer(); ChannelConfig channelConfig = new ChannelConfig(); channelConfig.nodelay(true,30,2,true); channelConfig.setSndwnd(1024); channelConfig.setRcvwnd(1024); channelConfig.setMtu(1400); channelConfig.setFecDataShardCount(10); channelConfig.setFecParityShardCount(3); channelConfig.setAckNoDelay(true); channelConfig.setTimeoutMillis(5000); channelConfig.setUseConvChannel(true); channelConfig.setCrc32Check(false); KcpServer kcpServer = new KcpServer(); kcpServer.init(kcpRttExampleServer,channelConfig,20003); 一台运行KcpRttExampleClient public KcpRttExampleClient()...
有连接进来disruptorExecutorPool1/10.0.0.7:55938 java.io.IOException: Conv inconsistency at kcp.Ukcp.input(Ukcp.java:163) at kcp.Ukcp.input(Ukcp.java:149) at kcp.RecieveTask.execute(RecieveTask.java:62) at threadPool.thread.DistriptorHandler.execute(DistriptorHandler.java:17) at threadPool.thread.DistriptorEventHandler.onEvent(DistriptorEventHandler.java:10) at threadPool.thread.DistriptorEventHandler.onEvent(DistriptorEventHandler.java:5) at com.lmax.disruptor.BatchEventProcessor.processEvents(BatchEventProcessor.java:168) at com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:125) at java.lang.Thread.run(Thread.java:748)
for example, compare with [kcptun](https://github.com/xtaci/kcptun), [dragonite-java](https://github.com/dragonite-network/dragonite-java). Please disable fec before do performance test :)
 