Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在用netty编写异步客户端。我需要有关发送到服务器的请求消息类型的信息,以便能够解码从服务器返回的响应。换句话说,解码逻辑需要有关请求消息类型的信息。如何在上游处理程序或解码器中获取这些信息?
提前感谢您的帮助。
您可以使用 Channel.setAttachment(..)、Channel.getAttachment()