MQTTX启动连接
│
│ TCP三次握手
▼
initChannel()
│ 安装MqttDecoder、MqttEncoder、Handler
▼
channelActive()
│ 此时只是TCP连接成功
│ MQTT还没有CONNECT
▼
客户端发送CONNECT字节
▼
MqttDecoder
│ ByteBuf → MqttConnectMessage
▼
channelRead0(CONNECT)
▼
handleConnect()
│ 保存Client ID、Keep Alive等信息
│ 生成CONNACK
▼
MqttEncoder
│ MqttConnAckMessage → ByteBuf
▼
客户端收到CONNACK
│
│ 后续发送PUBLISH、SUBSCRIBE、PINGREQ
▼
channelRead0(...)
│
│ 客户端发送DISCONNECT或者TCP异常断开
▼
channelInactive()
