We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kcp-netty/kcp-netty/src/main/java/io/netty/bootstrap/UkcpServerBootstrap.java
Line 192 in a911c73
The text was updated successfully, but these errors were encountered:
因为这些childChannel最终都是通过共用一个DatagramChannel进行读写的,为了线程安全,所以将这些childChannel都放到了同一个线程进行处理。如果想利用多核,可以bind多个端口,这样每个端口对应一个DatagramChannel,对应一个线程。
Sorry, something went wrong.
No branches or pull requests
kcp-netty/kcp-netty/src/main/java/io/netty/bootstrap/UkcpServerBootstrap.java
Line 192 in a911c73
这里为何不像tcp一样创建一个work的eventloopgroup然后依次使用next分配线程 这样让UkcpServerChildChannel分配到不同的线程 这样更能使用多核。现在的所有连接的接入和收到消息都在同一个线程处理,这个线程很容易成为瓶颈
The text was updated successfully, but these errors were encountered: