public class PortUnificationHandshake
extends io.netty.handler.codec.ByteToMessageDecoder
使用同一个端口去处理TCP/HTTP协议的请求,因为HTTP的底层协议也是TCP,因此可以在此处理器内部可以通过解析部分数据 来判断请求是TCP请求还是HTTP请求,然使用动态的pipeline切换
| 构造器和说明 |
|---|
PortUnificationHandshake() |
channelInactive, channelRead, channelReadComplete, handlerRemoved, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggeredCopyright © 2020–2022 The AIM Project. All rights reserved.