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

decoder、pack、framedecoder #316

Open
Deng-Xiaodong opened this issue Apr 21, 2024 · 1 comment
Open

decoder、pack、framedecoder #316

Deng-Xiaodong opened this issue Apr 21, 2024 · 1 comment

Comments

@Deng-Xiaodong
Copy link

编解码这部分感觉好乱。。。
首先connection已经默认使用framedecoder,然后在读客户端数据时已经成功解码得到imessage并且包装成irequest交给chainbuilder去处理。但是body的第一个inception是一个解码器,拿着rawdata又解码一次,得到imessage,然后调用ProceedWithIMessage去处理了一下下才真正进入router处理逻辑。为什么不在第一次由connection解码成功后的request直接进入chain处理router逻辑呢?中间的解码拦截器有什么作用?

@Deng-Xiaodong
Copy link
Author

哦,decoder inception 好像是为了支持自定义解码器。如果用户不setdecoder,那么就使用connection上默认的framedecoder

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

No branches or pull requests

1 participant