szhnet / kcp-netty

Java implementation of KCP based on Netty. 基于netty实现的java版kcp。
MIT License
329 stars 110 forks source link

请问这两个报错是什么问题? #10

Open wuruilong007 opened 6 years ago

wuruilong007 commented 6 years ago

java.io.IOException: No enough bytes of data at io.jpower.kcp.netty.Ukcp.input(Ukcp.java:56) at io.jpower.kcp.netty.UkcpServerChildChannel.kcpInput(UkcpServerChildChannel.java:192) at io.jpower.kcp.netty.UkcpServerChannel$UkcpServerUnsafe.read(UkcpServerChannel.java:559) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:745)

io.jpower.kcp.netty.KcpException: State=-1 after update() at io.jpower.kcp.netty.UkcpServerChannel.run(UkcpServerChannel.java:383) at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38) at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:125) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:745)

example里面的KcpRttClient static final int SIZE = Integer.parseInt(System.getProperty("size", "500"));这里由200改成500就会出现 请问这两个报错是什么问题?

szhnet commented 6 years ago
  1. java.io.IOException: No enough bytes of data 应该是调节了mtu造成的

  2. io.jpower.kcp.netty.KcpException: State=-1 after update() 表示重传次数过多,超过了deadLink