Netty 4.0在具有多个协议的多个端口上?
问题描述:
我正在寻找一个服务器示例,该示例将在端口80中组合一个http处理程序和在同一jar中另一个端口上的protobuf处理程序. 谢谢!
I'm looking for a server example that would combine a http handler on port 80 and a protobuf handler on another port in the same jar. Thanks!
答
我不知道您到底在寻找什么.只需创建两个不同的ServerBootstrap实例,对其进行配置并调用bind(..)就可以了.
I don't know what exactly you are looking for. Its just about creating two different ServerBootstrap instances, configure them and call bind(..) thats it.