[英]How can I send a message only after previous has been responded using Netty?
I have to send a command to the server. 我必须向服务器发送命令。
For example like AT commands. 例如像AT命令。
I know ChannelInboundHandler, but I can't create a complex architecture like this, I don't know how to create the right code structure. 我知道ChannelInboundHandler,但是我无法创建这样的复杂体系结构,也不知道如何创建正确的代码结构。
Please let me know if you are using netty for client or server implementation. 如果您将netty用于客户端或服务器实施,请告诉我。 I had similar use case, and was making use of channel pipeline to achieve the same.
我有类似的用例,并且利用通道管道来实现相同的目的。 Basically, I have one separate handler for
SimpleChannelInboundHandler<Response>
, in this handler subsequent request will be sent over channel as well. 基本上,我为
SimpleChannelInboundHandler<Response>
有一个单独的处理程序,在此处理程序中,后续请求也将通过通道发送。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.