Skip to content
New issue

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

自定义编解码 #21

Open
dxdx123 opened this issue Sep 16, 2019 · 1 comment
Open

自定义编解码 #21

dxdx123 opened this issue Sep 16, 2019 · 1 comment

Comments

@dxdx123
Copy link

dxdx123 commented Sep 16, 2019

非常感谢您提供这个开源代码,对我很有帮助。

如果加入自定义编解码,我自定义的编解码器应该放在哪里呢,目前看来似乎是要在TestServer的handleReceive中对收到的Bytebuf消息进行编解码处理。
这样以来就没办法利用pipline()来进行消息流处理。
/ch.pipeline().addLast(new UdpMessageDecoder()); // 消息加解密:消息ID(4字节)/

不知道我又没有把问题描述清楚,感谢!

@beykery
Copy link
Owner

beykery commented Sep 17, 2019

不行,目前的结构是要求你自己在handleReceive里面处理已经按照kcp协议分好的包。业务层的协议需要你在这里继续处理。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants